I'm studying the react ecosystem, I came from the AngularJS world and I have no idea which flux implementation should I use...
Can anyone explain what's the best, considering that I love the MV* structure of angularjs (1x)?
I found many resources but I still have many doubts!
Thanks in advance
A preexisting reference is here - https://medium.com/social-tables-tech/we-compared-13-top-flux-implementations-you-won-t-believe-who-came-out-on-top-1063db32fe73#.l0ui3uq2z.
However, when I started delving into Flux, I went with community ratings on Github and number of downloads in npm. Reflux was on top on both accounts. My rationale was that if a framework is popular and a lot of folks understand and use it, it should be simple. Being new to React and Flux I already had a lot to absorb and I found Reflux to be easier to understand because it took care of a lot of setup needs Flux has. However this may or may not be a desirable thing for the next person if you take the purist stance and want to stick to the core Flux paradigm as proposed by FB. I have read that Alt and Redux are more closer to it and they are also very popular at the moment.
tl;dr; Read Flux, then read at least three to four different frameworks and then take your pick.
I've been using for new project AltJS and to be honest, I love it.
2, 4 - It is pretty fancy due to the "usage sharing" (if I understand what you meant by that correctly). You create "logic" and "pure (dumb)" components which later on can be used plenty of times (there is no point to create identical view but with a different logic, so you simply "pick other store" for the same "pure" component"). Also it can easly track other Stores states, use many Stores at once in one component thanks to AltContainer (you definetly should try AltJS with AltContainer) and use actions from one store, while the other store gets updated (bindListeners).
3 - About learning curve, well I would say it is pretty easy to understand whole concept. It would literally take you at most one day to understand whole idea. Ofcourse there are more complex stuff involved there as well, but there always are some more complex stuff in other libraries as well.
5 - You can easily test actions and stores (there is even an example of that on their page) using "AltTestingUtils". You can also mix with with Chai or any other assertion library you are using. So that's pretty good I would say
6 - well wasn't whole idea of Flux about "scalability" as well? If we consider that AltJS is probably one of "purest" implementation of that, then I would say it should be pretty well in that. So far I can say that it is working for me well (though it is hard to see the future, cause right now it ain't that big). Though there are some tools to improve performance if problems with scalability would appear (for example, AltContainer does have shouldComponentUpdate).
7 - Whole AltJS was done to work in ES6, at least they say so (and I use it like that as well)
While alt examples encourage ES6 and alt was built with ES6 in mind it is perfectly valid to use plain old JavaScript instead.
I made a post about AltJS some time ago in other topic, you might find it helpful
https://stackoverflow.com/a/34256824/5538090
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With