-
Notifications
You must be signed in to change notification settings - Fork 28
Clean up effects when component unmount #37
Copy link
Copy link
Open
Description
I am using the library with Next.js and when I navigate to a different page for the first time I get this error:
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 ControlsProvider (webpack-internal:///./node_modules/react-three-gui/dist/react-three-gui.esm.js:89:23)
at DebugUIScene
at LoadableComponent (webpack-internal:///./node_modules/next/dist/next-server/lib/loadable.js:187:37)
at div
at div
at div
at Layout (webpack-internal:///./components/Layout.tsx:28:23)
at DebugUII think it is because the library does not clean up side effects when component unmounts. But it also could be a specific issue that only happen with such server-side rendered / isomorphic frameworks.
Could you confirm if this is a bug? Or is there a way to get around this?
If you need a reproduction project I can set one up. Please let me know. Thanks.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels