3 ms·
For 98% of projects? A global state object that gets passed down the component tree. This can scale to much greater complexity before it becomes an issue than
by michaelchisari 4y ago
For 98% of projects? A global state object that gets passed down the component tree.
This can scale to much greater complexity before it becomes an issue than many are willing to admit.
- SkyPuncher 4y agoI don't think people are concerned about the performance here. It just gets messy quickly. Most of the state management libraries allow you to avoid passing a value up and down the tree.
- farmin 4y agoAmen. I'm glad I'm not the only person that has resorted to this. I've done it on Angular too in the past. Just a core service that holds all the state, import it into everything.
- symlinkk 4y agoThen you are prop drilling. Most projects I work on have hundreds of components and that would get old fast.