'how can i fix this warrings, this warrings coming from react js

react-dom.development.js:67 Warning: Can't perform a React state update on an unmounted component. This is a no-op, but it indicates a memory leak in your application. To fix, cancel all subscriptions and asynchronous tasks in a useEffect cleanup function. at Login (http://localhost:3000/static/js/bundle.js:2780:79) at Route (http://localhost:3000/static/js/bundle.js:255317:29)



Solution 1:[1]

It's difficult to say specifics without seeing the code, but this happens because the component was unmounted and then there was a try to change the state afterwards. For example when you call navigate() and afterwards setState(). To avoid this you should check all the instances of state changes and whether they might be executed after the component was unmounted.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 André