3 ms·
> what's the alternative for small-to-medium React applications that still need to store state? I've found that with small React apps, you normally organise ea
by thaiphanvevo 9y ago
> what's the alternative for small-to-medium React applications that still need to store state?
I've found that with small React apps, you normally organise each component to be responsible for handling its own state.
If you need a global shared state but your app isn't large enough for Redux then lots of people pass callbacks down to child components as parameters. True story.
- rmetzler 9y agoYes, that's what I do. Managing the global state in the main component, setting up functions to change the state via the update helper [1] and pass these functions down to the dumb components. [1]: https://facebook.github.io/react/docs/update.html https://facebook.github.io/react/docs/update.html