Answer the question
In order to leave comments, you need to log in
When can shouldComponentUpdate still render?
I do it like this:
shouldComponentUpdate(nextProps, nextState) {
return false;
}
Currently, if shouldComponentUpdate() returns false, then UNSAFE_componentWillUpdate(), render(), and componentDidUpdate() will not be called. In the future, React may treat shouldComponentUpdate() as a hint rather than a strict directive. In such a case, returning false can cause the component to re-render.
Answer the question
In order to leave comments, you need to log in
Maybe forceUpdate is called somewhere, it works past shouldComponentUpdate
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question