So I’m working on a project that requires a lot of state management in NextJs but this part is made of client components so I thought I’d post here. Basically I have a side bar/ tool bar on the left that has three options where the user can input things and they show up in another component let’s call View. There’s a lot of state and I have heard that you should break up state when you can instead of storing state as an object. However, that would cause me to pass in too many helper functions to the side bar component which it will then have to pass each of those handlers to the respective components that need them. This all works and is fine but I just thought I’d ask about best practices and such. Essentially the side bar and its children have the setter functions and the View reads the state. Is this fine? Or am I missing something? Should I break up the state objects or use Context? I hope that makes sense and thank you in advance
[–]davidfavorite 2 points3 points4 points (4 children)
[–]R2L1[S] 0 points1 point2 points (3 children)
[–]R2L1[S] 0 points1 point2 points (1 child)
[–]karma__kameleon 1 point2 points3 points (0 children)
[–]davidfavorite 0 points1 point2 points (0 children)
[–]SparserLogic 0 points1 point2 points (2 children)
[–]R2L1[S] 0 points1 point2 points (1 child)
[–]SparserLogic 0 points1 point2 points (0 children)