Replies: 1 comment
-
We do something similar using svelte stores, it's been very effective for us. |
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'm trying to figure out how to manage global state in an existing application that has many many machines, with multiple levels of nesting.
To put this into more context, lets say I have an app with with the following structure:
Machine
A
loads some data, and this data is needed by machines further below.Problem
In the current state, if
H
needs a business object that is inside the context ofA
, it is passed all the way down, throughB
,D
, andG
.The machines in lower levels have valid use case for the top context, but I want to refactor the way they access it and not have to context drill.
I'm thinking about using a light store like jotai or zustand, something outside of react, to have the root machien manage global state that is exposed globally, accessible anywhere basically. Has anyone gone down such a path?
Beta Was this translation helpful? Give feedback.
All reactions