react-lifecycle-hooks

How does react decide to rerender a component

只愿长相守 提交于 2019-12-25 17:47:17
问题 I know React has a life cycle method called shouldComponentUpdate , Which by default return true and that's how the component decides to update But How does that life cycle method gets called, When a state or props change for that component. What actually happens when we receive new props or state? When We connect a component to redux state and mapStateToProps, Are we checking for a change in values inside the component? If not, When We are looking for a change in state or props? when the