Skip to content
This repository has been archived by the owner on Oct 23, 2023. It is now read-only.

Warning: Can't perform a React state update on an unmounted component. #153

Open
moo611 opened this issue Jul 26, 2023 · 2 comments
Open

Comments

@moo611
Copy link

moo611 commented Jul 26, 2023

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.
in Scanner (at SceneView.tsx:132)

@lpfrenette
Copy link

lpfrenette commented Jul 31, 2023

As stated in the warning message did you remove all listener in a useEffect hook or in the componentWillUnmount function?
This errer usually happen when you have a setTimeout or a fetch/axios call to a remote resource and the response arrives after your component is unmounted.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants