What is the difference between componentWillMount and componentDidMount in ReactJS?

前端 未结 8 517
Happy的楠姐
Happy的楠姐 2020-11-29 20:05

I looked at Facebook\'s documentation at (React.Component) and it mentions how componentWillMount is invoked on the client/server whereas componentDidMou

8条回答
  •  盖世英雄少女心
    2020-11-29 20:36

    ComponentDidMount() Method only changes the current page in class components but ComponentWillMount() changes all the pages which effected by setStates()

提交回复
热议问题