I'm creating a budget app in React.js, where my parent component has an Overall Balance, and one can create any number of specific "Budget" components (say, Vacations) , from which one can create any number of "Entry" components (say, I'll spend x number of dollars in San Francisco). My initial thought was that the parent can have an array of "Budget" components in its state that can keep growing and changing, and the Budget component can have an array of "Entry" components in its state and that can keep growing as well. However, I realize that this is bad practice because only one component should have state.
What is the best way to manage both my Budgets and their entries in the parent component, given that anyone should be able to go back and change the number of entries in any previously created budget?
Thanks for your help, and I'm sorry if this is confusing!