Answer the question
In order to leave comments, you need to log in
What causes the warning and how to track where Can only update a mounted or mounting component come from?
warning.js:44 Warning: setState(...): Can only update a mounted or mounting component. This usually means you called setState() on an unmounted component. This is a no-op. Please check the code for the HomePage component.
Answer the question
In order to leave comments, you need to log in
Could you show me the code. It often occurs when setState is called on your timer, and the component has already been removed from the DOM (unmounted): you have moved to another page, for example.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question