Why should not call setState in componentWillUnmount?

Posted by Editorial Staff | Updated on

Why should not call setState in componentWillUnmount?

You should not call setState() in componentWillUnmount() because once a component instance is unmounted, it will never be mounted again.


If you like this question & answer and want to contribute, then write your question & answer and email to freewebmentor[@]gmail.com. Your question and answer will appear on FreeWebMentor.com and help other developers.

Related Questions & Answers