It is very uncomplicated
For what it's worth, we've changed Redux usage drastically in the last three years. "Modern Redux" with Redux Toolkit and React-Redux hooks is drastically simpler to learn and use than the older-style patterns, and we get feedback from users on a daily basis telling us how much they enjoy using RTK.
If you're curious to see what that looks like, I did a video discussing the changes and cooperatively live-coding an example app:
https://redux.js.org/tutorials/index#learn-modern-redux-live...
and the "Redux Essentials" tutorial in our docs shows how we want people to learn and use Redux today:
https://redux.js.org/tutorials/essentials/part-2-app-structu...
Thank a lot for your hard work!
Nope, the tutorial tells me I better get good first in:
> React terminology: JSX, State, Function Components, Props, and Hooks
Does that imply you can’t use Redux without React at all? Or does it just use part of React’s concepts?
I’d totally love to learn to manage my application state better. Do I really have to pull React in with that? I use vanilla JS as much as I can because I want my apps to have a decent chance to still be working a decade from now.
Yikes, I hope not. One of my favorite things about Redux (last time I used it, maybe three years ago) was that it was easy, and even natural, to build an API client library around it that could be used almost anywhere that JS will run, because it wasn't tied to React.
However, in practice, probably 90-95% of Redux users _do_ use it with React. So, yes, all of our tutorials are written under the assumption that you are using it with React.
Additionally, we see lots of people trying to learn Redux too early in their journey. It's bad enough that bootcamps throw people through "4 weeks of JS, 4 weeks of React, 4 weeks of Redux, GO!", and we can't do anything to stop that. We do want people to learn Redux, but we've found that it's best if most people are already comfortable with JS and a UI framework (which, again, is normally React), before they try to dive into Redux. That way there's fewer new terms and concepts to learn at once, and it's more clear what benefits Redux can add and how it fits into the UI layer.
If you'd like to focus on just the Redux core concepts, I'd recommend going through our "Redux Fundamentals" tutorial. It explains the underlying principles and techniques, and how Redux works:
https://redux.js.org/tutorials/fundamentals/part-1-overview
There is content in the middle of that tutorial that explains how to use it with React, and if you want to use it with vanilla JS you'll have to recreate equivalents to some of those APIs yourself. But, the rest of the material should be directly relevant.
Also, please come by the Reactiflux Discord and ping us over in the #redux channel - we're happy to help answer questions!
If you're familiar with both already, are there any parts of Rematch's API you prefer over RTK's, that we should consider looking at for inspiration?
Context is a Dependency Injection tool for a single value. Note that it doesn't "manage" or "store" anything - it's just a tube that you can pass something through. Any actual "storage" is normally done with React's own `useState/useReducer` hooks, which actually _do_ store and update values.
Redux, meanwhile, is a tool for predictable state management outside React. Very different kind of tool, for a different purpose.
More details:
https://blog.isquaredsoftware.com/2021/01/context-redux-diff...
But it's based on a sound model. Go and check out elm, the project redux copied its structure from and you'll see what that model is capable of achieving in a decent language.
Today with hooks Redux is not too bad but still subpar. I used for years my own simplified store, these days I just use zustand.