4 ms·
That's why I said "feels". Redux is quite obviously about making state management better but just try to build a reasonably sized app using the Context api ins
by Mc_Big_G 6y ago
That's why I said "feels". Redux is quite obviously about making state management better but just try to build a reasonably sized app using the Context api instead of Redux and you'll quickly realize that the structured, opinionated, "right way" of doing things in Redux makes for a much happier experience.
- acemarke 6y agoHeh. As a Redux maintainer, I do appreciate seeing comments like this :) Btw, if you haven't yet seen our official Redux Toolkit package, you should check it out. It includes utilities to simplify several common Redux use cases, including store setup, defining reducers, immutable update logic, and even creating entire "slices" of state at once: https://redux-toolkit.js.org https://redux-toolkit.js.org Also, I just published a brand-new "Redux Essentials" core docs tutorial, which teaches "how to use Redux, the right way", using our latest recommended tools and practices like Redux Toolkit and the React-Redux hooks API. I'd encourage you to check it out even if you're already familiar with Redux: https://redux.js.org/tutorials/essentials/part-1-overview-concepts https://redux.js.org/tutorials/essentials/part-1-overview-co...
- Mc_Big_G 6y agoI'm actually on "Performance and Normalizing Data" right now. :) The documentation and tutorial is really well done, so thanks for that! I'm glad I attempted to build something without Redux first because at every step of the documentation/tutorial my brain just keeps exploding with "wow, this is going to make my life so much better" and helps me understand why it's built the way it is. Also, the toolkit is great and feels very Rails-y by providing default, built-in (and I'd argue opinionated) ways of doing things that simplifies development and reduces design decisions. Much appreciated.
- acemarke 6y agoThank you, it's really great to hear that feedback! Totally agree that RTK works best if you already know how to write Redux code "by hand", so that you're familiar with the concepts and can see what the abstractions are doing for you. That said, my goal for that "Essentials" tutorial is that folks who have never used Redux before (like, say, someone in the middle of a typical bootcamp) would hopefully be able to start writing real Redux code using RTK and be productive with it, even if they don't understand everything that's going on under the hood. The feedback we've gotten on this new tutorial, as well as on RTK in general, tell me we've mostly managed to hit that goal. FWIW, my next task is to rewrite the existing "Basics/Advanced" tutorial sequence. It will still be a "bottom-up" explanation that teaches the underlying mechanics and shows how to do things "by hand", but I want to clean it up considerably to remove outdated references and show simpler patterns. If you're interested, my notes on how I want to redo it are here: https://github.com/reduxjs/redux/issues/3855 https://github.com/reduxjs/redux/issues/3855 If you've got any feedback on the contents of the existing tutorial and what you'd like to see improved, please feel free to leave a comment there.