Now that Relay is out in preview, it will probably replace Flux entirely.
I spent a while working on a React Native app and quickly learned that I needed to bring in Flux. After watching a few videos and reading a few blogs, I added my own implementation of flux to my react native app.
- Isomorphic app
- Having the right information at page load is essential
- Not having to compromise on interactivity is the dream
- Native mobile support
- Get as close to write once, run anywhere as possible
- Without sacrificing quality
- Sustainable tools
- Ensure all tools use sound engineering practices
- Make sure there is either a stable following to a tool or an easy pivot
- High quality testing
- Stack should be designed to hold complexity well
- Regression tests should be simple and clear
What I’ve tried so far…
Why not go with vanilla Flux?
Using only the Flux tools given by Facebook seems like a no-brainer, but besides being extraneously verbose, you have to maintain, grow, and enforce the framework yourself.
- Pretty good assurance that it will not fall out of popularity and leave you stranded.
- Verbose in a bad way
- Leaves a ton of tooling to the imagination
- I lot of ways to mess up
- Left to your own devices on isomorphism
A full featured flux framework from Yahoo.
- Lots of convenience functionality
- Yahoo backs it and they still are a large company
- A touch magical
- Pretty large
- Still a bit verbose
A minimalistic rethinking of Flux for the functional programming world.
- Relatively small
- Easy to conceptualize and get started
- No dispatcher, it is built in
- Not isomorphic
- Small bits of built in magic, make it less flexible
- Suggests creating stores that subscribe to other stores
- This could create hidden complexity layers deep
Minimal isomorphic Flux.
- Readme says it will not be supported
- Gave me the name of a framework the author likes better
Advertised as “Atomic Flux with hot reloading,” A minimalistic, isomorphic take on Flux that is bare bones but extensible.
In spite of its small following and young API, the minimalistic approach only gets as far from the vanilla implementation of Flux as you want it to. This would make it relatively easy to pivot to another Flux implementation of maintain independantly.
- Hot reloads code
- Dispatcher optional, atomic by default
- Pre-1.0 API likely to have breaking changes
- Smaller following
- May not be a winner
- 2015-06-17: Published
- 2015-08-14: Added note about Relay