This may be treading that line between answerable and opinionated, but I\'m going back and forth as to how to structure a ReactJS component as complexity grows and could use som
A reading from Thinking in React:
Let's go through each one and figure out which one is state. Simply ask three questions about each piece of data:
- Is it passed in from a parent via props? If so, it probably isn't state.
Does it change over time? If not, it probably isn't state.
Can you compute it based on any other state or props in your component? If so, it's not state.