I have this dashboard creating app that has pretty deeply nested components and I need to propagate state, such as the current dashboard, down to these components. The current dashboard is a rather large object that contains all information about the what widgets are in this dashboard, where they are, how they look, etc.
Right now I'm calling to a database, converting the data to the dashboard object, then rendering the dashboard by passing this object to components such as the tool bar, side bar, canvas, widgets. These child components might change the properties of the dashboard object but never the dashboard object itself so I don't think I need output.
It works fine but some components have too many inputs and they even sometimes need outputs. It's getting pretty messy.
I was thinking of just creating a service that manages the state for the entire app. I can't find much information online about best practices, just many ways of doing the same thing. If anyone can provide any information on why using one method of state management is better than another, that would be great!