.torx
How to preserve reactivity in a multilevel object stored in a nanostore map ?
Let me recontextualize,
I created nanostores in a library to handle some logic shared between every websites we develop
library/core
. This library is used by a second library that handle framework specificity : library/solidjs
, library/react
, etc.
In my final project, I install "library/core" and library/solidjs
, and Creates a component that need the cart
store.
The problem is, I must also install @nanostores/solid
to read the store via useStore
, which, you'r right, creates a solid store. When I use useStore inside my component, it works well, no problem about it.
But, I don't want to tell people they will need to install @nanostores/solid
to use the logic inside my library, I'd prefer to have a function in library/solidjs
that would return the return value of useStore
, but if I do it, I loose the reactivity.39 replies
How to preserve reactivity in a multilevel object stored in a nanostore map ?
I don't think the problem is from the
.values()
, otherwise using the useStore function wouldn't work either, it is like the useCart function makes solid lost the track of the signal.
I don't really understand why deriving the signal doesn't work in that situation,39 replies