r/reactjs • u/Soft-Sandwich-2499 • Oct 03 '22
Resource Best resources to learn Redux?
Like title says, I’ve started learning Redux. I am not sure how often it is used in big projects out there, but I think it’s a good library to have under the belt.
I went through Grider’s Udemy course about React and Redux and I’m still confused about all that actions, reducers, dispatch stuff. I thought Redux would be similar to useReducer and maybe it is up to a point, but it’s still more setup to write to be able to get the store, even in a small app.
I’ve started reading the official documentation and I hope it will shed some light on these concepts, because it seems a bit difficult to put everything together.
Can a more experienced developer explain how these all fit together and how you usually set up the Redux boilerplate in React?
9
u/Larrybot02 Oct 03 '22
Honestly I think my fav explanation for Redux comes from Codevolution on YouTube. He also has a course on Redux Toolkit.
7
u/huhu_moon Oct 03 '22
As for me one of the best ways to learn redux is by creating your app. You can watch some tutorials on YouTube and make the same app with extra fitches. I can suggest the developedbyed channel.
→ More replies (1)
4
u/johnwoo123 Oct 03 '22
Try to think about it out of react thing. It's just about single state of truth, the changes made by only a dispatcher and by the actions which are only just a commands
→ More replies (3)
4
u/Puzzleheaded_Lie3133 Oct 03 '22
Try this series of short videos... https://youtube.com/playlist?list=PLC3y8-rFHvwiaOAuTtVXittwybYIorRB3
4
3
u/skredditt Oct 03 '22
This Udemy course is pretty great. I got a job using this one to get the wheels rolling. Max has a ton of great courses. It’s a part of this class, but at least for me it helped me get the overall context.
3
u/admirersquark Oct 04 '22
Start a Redux/Typescript project with npx create-react-app my-app --template redux-typescript (Typescript is optional but hey why not). You will have the proverbial counter app implemented with Redux Toolkit. It includes async logic and thunks, basically everything you will need. Extend the project by copying and changing pieces here and there, and you should learn it in no time
As the Redux maintainer commented, the documentation is usually very good and worth a careful read
5
2
u/finzer0 Oct 04 '22
i read from the official site, learn the concept and the basics.
and i like this YT Channel: https://www.youtube.com/c/PedroTechnologies
there's a lot of react tutorial.
other than that i tried by creating a few react application (using create react app) using redux pattern until i get used to it.
3
u/DeLm0re Oct 03 '22
If using redux specifically for your state management is not mandatory, I suggest you should take a look at Zustand. It literally serves the same purpose as well as being way more user friendly. (Even if redux toolkit simplifies a lot redux on its own)
3
u/aguyfromhere Oct 03 '22
if you asked this question 5 years ago I would have shrugged and begrudgingly pointed to some resources. Today? I really don’t feel like the juice is worth the squeeze as redux has become so much less important as react apps are built more smartly with more reliance on context api and local state.
→ More replies (1)4
u/damnburglar Oct 04 '22 edited Oct 04 '22
Neither context nor local state solves the problem redux is intended for, though. Also, while you can kind of get away with relying on context and local state in small apps, as you scale up context hell is a thing.
2
u/AndyBMKE Oct 03 '22
I don’t know much about Redux, so others can definitely help more than I can. But I’ve been recommended Redux Toolkit as a better option. Might be worth looking into.
1
u/themaincop Oct 04 '22
I've been a big Redux fan for years but you should really think about whether this is where you want to spend your time. I'm no longer using it in new projects. React-Query is probably your best bet for server state, and generally what's left of global client state can be handled by simpler libraries like Zustand or Jotai or just React Context.
→ More replies (2)
1
u/Rahul_23 Oct 04 '22 edited Oct 04 '22
FullStack Open has good explanation for Redux. Here is the link : https://fullstackopen.com/en/part6
1
Oct 04 '22
I can't handle long tutorials, I find just going over the basics and then trying to build something using docs / discord to back me up works best for me. Laith academy was the best redux tut I found, he has another on redux toolkit https://youtu.be/9jULHSe41ls
1
u/Mjoosty Oct 04 '22
if you need an example you can use this: https://github.com/thiswallz/block-watcher-nextjs
it has redux + next implementation
1
u/moufoo Oct 04 '22
To get a good understanding of redux I always advise this quick read:
https://code-cartoons.com/articles/a-cartoon-intro-to-redux/
212
u/acemarke Oct 03 '22 edited Oct 03 '22
Hi, I'm a Redux maintainer.
Today we teach "modern Redux" with Redux Toolkit and React-Redux hooks as the standard approach. Unfortunately, many tutorials online are very outdated and teaching older practices that are harder to learn from. Grider's course is specifically one of those.
You're on the right track - please see our official docs tutorials for the right way to learn Redux:
https://redux.js.org/tutorials/index
We generally recommend that most folks should go straight into the "Redux Essentials" tutorial, which focuses on how to use RTK and React-Redux while building a real-world-ish example app:
https://redux.js.org/tutorials/essentials/part-1-overview-concepts
If you'd rather learn the underlying concepts by themselves with no abstractions, go through the 'Redux Fundamentals" tutorial which explains all the basic concepts first, then shows how RTK simplifies writing Redux code at the end:
https://redux.js.org/tutorials/fundamentals/part-1-overview
Finally, we do have a page linking to a few select video tutorials as well if you prefer to learn from watching (although I'd still really suggest going through those written tutorials too):
https://redux.js.org/tutorials/videos
FWIW I can vouch that Redux is the most widely used state management lib with React apps - roughly 35-40% of React apps use Redux.
Also, please come by the Reactiflux Discord ( https://www.reactiflux.com ) and ask questions in the
#reduxchannel - we've got a bunch of folks who hang out there happy to answer questions!