Replies: 2 comments
-
the real problem is, if I define a [useStorage] inside [createGlobalState],when it got unmounted,the [useStorage]'s instance will unmount the eventListener from the storage Here's DEMO |
Beta Was this translation helpful? Give feedback.
0 replies
-
I know how to avoid this, but this is unintuitive |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Here's a DEMO
When the ChildComponent is being unmount, the globalState's (created by createGlobalState) onUnmounted hook also be called
Shouldn't it be an independent instance from all other component?
Beta Was this translation helpful? Give feedback.
All reactions