Prevent React setState on unmounted Component
There are too many people who encounter the following warnings. I have seen many GitHub issues regarding it and many people are asking me about it as well. That's why I wanted to have this article to address it and reference to it. Warning: Can only update a mounted or mounting component. This usually means you called setState, replaceState, or…