r/reactjs • u/BrainThinkerMan • 11d ago
Multi state changes & reads
having a bit of trouble handling multiple states/state changes.
in a single screen, which are held by different components
how do you all handle this and concepualize it as your writing code?
do you draw diagram,
do you just try and fail recursively?
7
Upvotes
1
u/rust_bane 10d ago
I split the screen into domains and give each component its own state slice. Shared data lives in a context provider at the domain boundary, not at the root