Why is this store still reactive?
https://playground.solidjs.com/anonymous/5b3ceb29-ea8d-493d-a2fb-fd464b28ae2b
I create a store in a
createRoot
block. I call dispose()
right after creating the store.
As seen in the demo, the store is still reactive even though I called dispose
. Anyone knows why the store didn't lose reactivity even though it was created under a disposed root? What did dispose
do?
(note that I don't expect anything specific, I'm only trying to understand the behavior and mechanics)1 Reply
dispose
cleans up the owners in its scope. Stores are built on top of signals and they have no scope. So dispose
has no effect on the store in scopes that aren't descendants of the scope you clean up