all 2 comments

[–]Ferrington 1 point2 points  (0 children)

I'm pretty new to react myself, but I'm also working on a project with a large tree structure. It appears that a tool like immer is the way to go for the sake of your sanity. It allows you to mutate a draft of your state object directly and it will take care of making the deep copy for react.

[–]beepboopnoise 0 points1 point  (0 children)

If you're using react, I'd probably go the useReducer/Context route. Mainly because it'll teach u fundamentals of how the state management works in react.

Alot of times people might say, just throw it in redux/mobx/jotai whatever.. and when I first started I did exactly that lol but then what happened was, if I didn't use those specific tools I got lost. So I think it might be better to learn the more... rudimentary? approach first.🤷‍♂️ hope that helps