Hi. I'd actually bookmarked Flood several months back as an example of a "real" project that used Redux. However, I just came back across it, and I see that you switched from Redux to "vanilla" Flux. I'm curious - were there any particular reasons why you did that, especially given that you had what looked like existing code in place? I'd be interested in any thoughts or information you could offer on your experience with Redux and decisions.
Hey Mark, thanks for noticing!
I chose to stop using Redux because I didn't like that changes to the state tree resulted in all of my components re-rendering. I did some reading to see what other people were doing to mitigate this problem and I couldn't find anything satisfactory.
I prefer the explicit control I'm given by responding to specific events in my components, which I felt I could accomplish more easily with "vanilla" Flux.
Admittedly, I probably didn't give Redux enough of a chance. Perhaps it can provide the exact same level of granularity I desire (or maybe my desire is ridiculous). Redux is fantastic and I don't mean to discredit it by any means!
Hmm. If you're using the React-Redux package's connect() function to hook your components up to the store, they should generally only be re-rendering if there's actual new data coming in for that specific component. There _are_ a few nuances to that - it primarily uses shallow equality checks, so if you're creating new array references in your mapStateToProps functions by using Array.map() or something similar, that can cause excess rendering.
If it helps, I have an item on that in the Redux FAQ, at http://redux.js.org/docs/FAQ.html#react-rendering-too-often.
Obviously, it's your project, and you're welcome to use whatever you want :) But, if you do have any further questions about Redux, please feel free to ask. Also, I generally hang out in the Reactiflux channels on Discord most evenings US time, and there's a bunch of other people who are happy to help out as well. Invite link is over at https://www.reactiflux.com.
Thanks for this, Mark! I appreciate you reaching out and providing these resources. For now, I'll keep Flood the way it is (because it's progressing a lot slower than I'd like it to), but I'll definitely consider Redux for future projects.
Sure.
I'll throw in two more resource links for you. I keep a list of high-quality React and Redux-related tutorials and articles over at https://github.com/markerikson/react-redux-links , and a catalog of Redux-related addons and utilities at https://github.com/markerikson/redux-ecosystem-links .