ignite
ignite copied to clipboard
Brand new app - Can't perform a React state update on an unmounted component
Discussed in https://github.com/infinitered/ignite/discussions/1941
Originally posted by papadi May 12, 2022 When I'm creating a new app (npx ignite-cli new MyTestApp --expo) and run it on the browser without any modification of my own (yarn web) then I get this error in my browser console.
"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."
Any idea why? I cannot detect where it's coming from.
So, the issue is that the component is unmounted, but then it tries to do this restore.
https://github.com/infinitered/ignite/blob/a2a075f15358e52b335e42b450295410d888533a/boilerplate/app/navigators/navigation-utilities.tsx#L122
We need to detect that the component has unmounted and prevent trying to update the component.
@papadi FYI ^^
:tada: This issue has been resolved in version 7.15.1 :tada:
The release is available on:
Your semantic-release bot :package::rocket:
:tada: This issue has been resolved in version 8.0.0 :tada:
The release is available on:
Your semantic-release bot :package::rocket: