Single/scope containers don't auto remove store when unmounted
See original GitHub issueI checked that react-sweet-state
will remove the store when unmounted in case it hasn’t had any subscriber. But it didn’t work in my case. I debugged and found that the deleting happens before subscribers unsubscribed. Did i wrong somewhere or is this the bug?
Issue Analytics
- State:
- Created 3 years ago
- Comments:5
Top Results From Across the Web
Can't perform a React state update on an unmounted ...
This seems like a nice solution if you've already narrowed down the cause/useEffect that is causing the problem, but one of the questions...
Read more >How to keep your docker installation clean? | by Maciek Opała
Good news is that docker doesn't use system resources besides disk space for non-running containers, images or unmounted volumes.
Read more >docker volume prune - Docker Documentation
docker volume prune: Remove all unused local volumes. Unused local volumes are those which are not referenced by any containers.
Read more >Job failed (system failure): Error: No such container ... - GitLab
Summary. It happens on random (for about 10% of the jobs), in 2-5 min into the job. Job simply fails with this error....
Read more >How To Share Data between Docker Containers on Ubuntu ...
Because you used the --rm flag, your container will be automatically deleted when you exit. Your volume, however, will still be accessible. exit....
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I’ve verified and that is the case indeed. It is properly cleaned up on scope update however on unmount the check is done on
componentWillUnmount
while the listener removal is done after unmount (due to howuseEffect
works), as you discovered.@albertogasparin thank you so much. I upgraded and it works well.