-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Which Flux implementation should I use? #22
Comments
This is closed but i still like reflux for its simplicity |
@ChaosD It seems like Reflux misses some important characteristics of the Flux architecture: Can you dispatch actions in a predefined order with Reflux? Make sure that all the actions are dispatched synchronously (the next action dispatching does not start before finishing dispatching of a previous one)? Can a single action creator / method dispatch more than one action at a time (a couple of different actions)? |
Be warned, I most certainly cannot answer your questions in a satisfying way because I'am just getting started with react.
I could not find anything about action creators dispatching multiple actions but since actions dispatch themselves, i imagine you could simply call multiple actions to get what you need. I'am not quite sure if I got you right here but i cannot imagine a situation where this might be required. Could you elaborate? These articles seem to address some of your concerns and helped me a lot understanding reflux:
|
Have you reopened this issue for further discussion or are you already considering reflux? I'd love to hear your opinion about it because I'am also about to make this decision. |
I just studied the flux docs again and it seems that you are right. if you want to stick to flux as close as possible, reflux might not be the best bet. Fluxxor is new to me, thanks for pointing me there. I will definitely check it out. |
I played a bit with Fluxxor and it convinced me. It is really better if you do not want to be led astray from the Flux pattern. Maybe it is time to rename the issue... ;) |
Try https://github.com/deloreanjs/delorean which we build and it's too
|
A nice summary can be found here: |
I personally settled for Fluxxor. I think it's the perfect blend between vanilla flux and reduced boilerplate and you can further reduce it with custom mixins. If the project ever dies, it would be easy to migrate. It's a non negligible advantage if you're in react for the long term. |
one more to consider... |
I don't see compelling reason why to use Dispatcher. I prefer Reflux, it's simpler and cleaner. |
I'm personally using https://github.com/goatslacker/alt |
FWIW, a bunch of the links to the npm packages (from the images) go to the wrong packages. |
If the goal is for the application to be isomorphic, you should look into our Fluxible library. We're using store instances instead of singletons to avoid concurrency issues that you'd see on the server when doing isomorphic. |
@mridgway, but that adds complexity... Have you tried the other way around - keep using singletons, but make sure that each server-side rendering operation (HTTP request) uses a separate JavaScript execution environment? |
You have two options if you want to use a separate environment: use a separate node process for rendering each request or using node's We haven't found that it adds that much complexity at all. In fact, it makes it easier to test stores because you don't have to worry about side effects between tests. You can see an implementation of Fluxible in our flux-examples or our docs site. |
@mridgway what about rendering React app directly with V8 without Node's overhead? |
I came to post about this exact thing and found this discussion. alt gives you lots of flexibility in terms of isomorphism, you can keep your stores as singletons without using The case for alt:
|
Well, there is also Flummox which aims to be idiomatic, modular, testable, isomorphic Flux & with no singletons required. |
I came across this post and thought it was quite interesting, I have read the FLUX docs a while back and the possibilities are endless, however these flavours of flux just add a few tweaks to the Facebook flux minus a few of the core concept. (dispatching order, single point store optimisation, wait-for, and over all granular control) The npm charts that are at the top of this page, is not drawn on the same scale, so comparing them visually will be misleading read the values carefully |
That's because any JSX expression (
That's what you get after JSX:
Is this what you expected to get?
https://github.com/erikras/react-redux-universal-hot-example/blob/master/src/client.js#L37 |
@sompylasar On a side note I'm kinda surprised nobody has converted this kit to redux yet, considering it's part of WebStorm and it now being used in real, high-end development. |
This is quite simple to use, |
What flux? http://github.com/hellyeahllc/exim |
😼 |
I personally use Alt, tried Redx and I didn't like switch statements, constants, too much boilerplate as for me. |
@koistya could you please fix the typo by replacing depricated with deprecated ? |
redux please :) |
Switched to redux finally, it's easier when App grows I need to change and access data from different stores, it's easier when it's all single store. |
Here we are using redux, the best of them all: github.com/Dindaleon/hapi-react-starter-kit |
Does anyone have a fork of this kit with redux implemented? |
@heks if not, you should be able to cobble one together using one or more of these: http://habd.as/awesome-react-boilerplates/ |
I'm going to close this one as it's not a real issue or feature request. But feel free to continue the conversation on this thread. You're also welcome to participate in discussions on Gitter, Appear.in, or StackOverflow. |
Redux rocks :) |
It's gaining mindshare. Haven't used it myself yet. I'd personally love to explore something a little less clever than Redux. The amount of boilerplate one has to write with Redux, middleware you have to use (i.e. thunk, saga, whathaveyou) can quickly lead to a mind numbing amount of analysis paralysis. That said just pick something and go with it, learn from your mistakes and get better next time. There is and will never be a "correct" answer to this infinite thread. |
@JHabdas 100% agree. I'm really tired seeing so many new JS things these days. RxJS, NG2.0, ES7, JSPM, WebGL, fluxxxxxxxxZ etc, etc. Besides that, we have to be able to stay productive and GSD. |
react's family!react |
Preact FTW! Wait, no. Inferno. Wait... ::thump:: |
Simpler redux alternative - dynamo.Js |
Thanks for sharing @valera-rozuvan. I worked with Redux and React for 6 months at the Enterprise level and constantly felt myself wasting time trying to create simple interfaces. ⭐️ added |
Apollo and Redux or Relay modern or everything else in this order. |
But probably not this Apollo. Or this one. |
@langpavel Do you mean Apollo from this project https://github.com/apollographql/react-apollo ? |
I use this one. |
@valera-rozuvan Yeah, this one: https://www.apollographql.com/docs/react/ |
Relay by Facebook + examples
redux by Dan Abramov
flux by Facebook + examples
alt by Josh Perez + examples
reflux by Mikael Brassman + examples
flummox (deprecated) by Andrew Clark
fluxible by Yahoo
fluxxor by Brandon Tilley + examples
marty.js by James Hollingworth + examples
fynx by Alan Plum
McFly by Ken Wheeler + example
DeLorean.js by Fatih Kadir Akın + examples
fluxify by Javier Márquez
Comparison: https://github.com/voronianski/flux-comparison
The text was updated successfully, but these errors were encountered: