4 ms·
I recommend redux, like sibling commentor cel1ne. You should just use a single store for everything, as is recommended in the Redux docs, and then if a particul
by kcorbitt 11y ago
I recommend redux, like sibling commentor cel1ne. You should just use a single store for everything, as is recommended in the Redux docs, and then if a particular view of your app only needs a subset of all the data, just "connect" it to the subtree that's relevant using react-redux. I use it with React Native and it works great. Just be sure to use the react-redux instructions for React Native.
The best thing about Redux (for me) is the ecosystem. There's tons of active development around middlewares (logging, persistence, routing, etc) and best practices. Its recent popularity means that you really can follow the beaten path and have a sane, performant app.
EDIT: If you're interested in an example React Native/Redux app, you can check out the toy HN reader I'm working on[1]. There are some critical missing features that make it not yet effective as an HN reader, but it's a decent React Native for Android tech demo.
[1]: https://github.com/corbt/HNReact https://github.com/corbt/HNReact