-
Notifications
You must be signed in to change notification settings - Fork 42
switch to a much more vanilla flux solution #28
Comments
Obviously I'm biased, but I think Flummox hits all your requirements perfectly. One nice thing about Flummox which may not be noticeable at first is that since it's self-contained, you can replace your old Flux stores and actions one at a time — in other words, have both Fluxible and Flummox stores running side by side during development until they're all replaced. (Does that make sense?) Also, in order to get feature parity with Fluxible and alt, I need to implement dehydration/rehydration. I've opened up a new issue to track that on the Flummox repo. |
I'll try to work on it thanks. |
Yeah, absolutely. The state API for Stores is designed to be very similar to the API for React components. Here's an working example I made just this past weekend on an internal project for work: https://github.com/parisleaf/parisleaf.com/blob/develop/src/shared/stores/PageStore.js Eventually, you could even create a new class ImmutableStore that serves as the base for all your stores. I think there's lot of potential for this pattern (+mixins) as a "plugin" strategy. |
Thanks, I'll take a look. I just came through this: https://github.com/goatslacker/iso/blob/master/examples/react-router-flux/server.js |
The bootstrapping part is definitely nice, and next on my list to implement in Flummox. But it's using a singleton https://github.com/goatslacker/iso/blob/master/examples/datetime-flux/src/alt.js so you're forced to have this awkward separation between user-specific data and regular data. Flummox's approach is far more straightforward, in my opinion. It removes isolation as a concern so you don't have to jump through so many hoops. I'll start work tonight to get an example up to show you what I mean. Can't make promises on a timeline though, because I'm in the middle of another project. Hopefully by end of week. |
I've (rather hastily) thrown together a demo of an isomorphic app using react-router, Immutable.js, and Flummox. https://github.com/acdlite/flummox-isomorphic-demo Super basic and needs more attention, but it works. Maybe this will help you out until I find time to work on the docs / make a better demo :) |
Hey, thanks for your hints. Thanks man |
@acdlite the process has started :) |
6to5 has a nice overview: http://6to5.org/docs/learn-es6/ https://github.com/getify/You-Dont-Know-JS is also a really great resource. This was actually my first webpack experience. I still <3 browserify, but react-hot-loader alone is worth the switch. |
yes, but webpack is also awesome because it supports dynamic require. |
Oh wow. Yeah, in my experience gulp + browserify/watchify was never a good combo. browserify works best via the cli. (That was my original motivation for abandoning gulp and just using make, but that's a separate topic, haha.) |
I'm trying now to remove gulp watchers in favour of react-hot-loader. |
With react-hot-loader, your app maintains its entire state on update. This is awesome if you're working on anything interactive, like animations. But I agree, for the most part, watchify + livereload (or browsersync) is perfectly fine and almost as fast. Hot loading is just nice to have. |
For today the switch to webpack is enough :) I'll start soon looking at your examples |
very interesting conversation -- thanks guys! |
Morpheus is highly coupled to fluxible.
I really enjoy it, but I think a much more vanilla solution would be the best solution.
In order to get rid of fluxible, we will need to face some problems:
@acdlite any thoughts ?
The text was updated successfully, but these errors were encountered: