What happens when you delete a xstate/store? #5161
Unanswered
ping-maxwell
asked this question in
Q&A
Replies: 1 comment
-
It is strongly recommended that you only do immutable updates. Would this work for your use-case? |
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
-
I want to have a global object called
windows
. Within, contains keys representing the window id, and the values would be entirely new stores created viacreateStore
.My first question is:
is this fine to do so? I don't like the idea of having an array which then contains all the windows with that all being managed by 1 store since something like
useSelector
and other things may have issues dealing with arrays and objs within.My second question is:
What happens if I call
delete
on a key in the windows global object? Does xstate/store still run things in the background not knowing that I just deleted the store or will it safely not do anything?Beta Was this translation helpful? Give feedback.
All reactions