React Redux Toolkit Tutorial for Beginners | Learn Modern Redux

Поделиться
HTML-код
  • Опубликовано: 21 окт 2024

Комментарии • 326

  • @DaveGrayTeachesCode
    @DaveGrayTeachesCode  2 года назад +36

    Redux has previously been difficult to learn and implement, but it has also been the best known global state management system for React. The creators of Redux have addressed the difficulties of Redux by offering Redux Toolkit as the recommended modern way to implement Redux. Redux Toolkit abstracts away some of the previous difficulties and makes applying Redux to your project easier! If you are just getting started with React, I suggest completing my React JS full course for beginners first: ruclips.net/video/RVFAyFWO4go/видео.html

    • @eric_ng5253
      @eric_ng5253 2 года назад

      I have been watching your tutorials and I will say it's great. yours came out in handy!... Do you have any on Redux API?

    • @DaveGrayTeachesCode
      @DaveGrayTeachesCode  2 года назад +2

      @@eric_ng5253 this is my first on Redux and Redux toolkit. I previously have one tutorial in my react series on easy peasy redux which is a great implementation. I also cover the context API in that series.

    • @EndLessPain9999
      @EndLessPain9999 Год назад

      what about useContext??? can't replace it? sorry for newbie questions

    • @BusinessWolf1
      @BusinessWolf1 Год назад +1

      It is not at all the best known global state management system for React. It's probabbly the worst.

    • @imraanali6410
      @imraanali6410 Год назад

      please provide the VS code theme name sir!!!

  • @mohammaddaudibrahim3501
    @mohammaddaudibrahim3501 3 месяца назад +9

    A mental model that has helped me understand the flow
    1. State -> Object
    2. Actions -> Events
    3. Reducers -> Event Listeners
    4. Dispatch -> Event Triggers

    •  2 месяца назад

      This is an incredible alternative way to remember them. Thanks.

  • @NamNguyen-oz8uj
    @NamNguyen-oz8uj 2 года назад +51

    I learned from udemy and from many coding channels on youtube, BUT you are one of the very best teachers, your teaching style is so simple and easy to understand. Thank you very much Dave, look forward to all of your new videos 🎉🙏✨

  • @mohamedyoussef8835
    @mohamedyoussef8835 2 года назад +5

    I agree with Nam Nguyen's comment... "I learned from udemy and from many coding channels on youtube, BUT you are one of the very best teachers, your teaching style is so simple and easy to understand."

  • @southernsunreviews5932
    @southernsunreviews5932 Год назад +4

    This demo is the first one in what feels like 100 youtube videos that work. Thank you so much!

  • @anamatei2134
    @anamatei2134 Год назад +3

    Dave, I have now started to watch only your videos... Please don't ever stop sharing your knowledge with us. I love your teaching style, I learn so much from you. Thank you ! :)

  • @cmefindaname
    @cmefindaname 2 года назад +7

    Your teaching style is amazing! Thank you for the intro to Redux Toolkit!

  • @Proxamm
    @Proxamm 2 года назад +12

    Dave, you have quickly become my favorite RUclips channel to learn from. Your pace, tonality, and very well structured lesson context is beyond amazing. I've learned so much from you and have digested your content very easily. Thank you for all you do!

  • @FloraSora
    @FloraSora Год назад +3

    Just two notes for you.
    1) I LOVE how you specify what shortcuts you're using! We're beginners, we don't know your shortcuts! Thanks for being one of the first and few who actually spell out their hotkeys in tutorials like these.
    2) Great tutorial, I feel my brain expanding. Great note on progress rather than perfection. That's the ticket. That's the energy we need for the new year, 2023.

  • @thebuildguy7
    @thebuildguy7 23 дня назад

    Simplest tutorial ever on redux! Thanks Dave!

  • @CuteFunnyVideos20
    @CuteFunnyVideos20 Год назад

    I just dont know why I am seeing this right now. I have wasted a lot of time trying to understand redux toolkit from other tutorials but I got more confused.
    But everything makes sense to me now.
    U are a gem of a teacher. Thank you for all you do.
    After watching ur node js course, I fell in luv with ur teaching style.
    Thank u Sir❤

  • @deoxzyKun
    @deoxzyKun 2 года назад +1

    by far the best video on understanding redux rn! amazing work brother

  • @codingispower1816
    @codingispower1816 Год назад +1

    Great intro. Can't wait to do your next redux tk vid!

  • @TannerBarcelos
    @TannerBarcelos 2 года назад +1

    Use it at work, learned a while back + learned some RTK recently. Used it on a project of my own actually. But, it still somewhat slips over my head here and there. Going through these videos has been the nail in the coffin for understanding it all. You wonderfully explained it. Your style resonated with me - straight to the point, technical, and not completely easy.

  • @hamzahahmad1670
    @hamzahahmad1670 2 года назад +1

    It's awesome how the tutorial was thorough yet concise. Great stuff

  • @criztiandev
    @criztiandev 2 года назад +1

    Hi, dave it's been a month since. I remember your Js course and it helps me a lot in my web development journey. I also finished your react course and not. I want to finish this redux course for you. I have recommended my friends to watch your tutorial because you teach so simple, direct, and easy, especially to beginners. Mabuhay ka Dave

    • @DaveGrayTeachesCode
      @DaveGrayTeachesCode  2 года назад

      Thank you for the kind words, Criztian! 🙏 I am glad I have helped you on your journey! 🚀

  • @donaldballowe8855
    @donaldballowe8855 Год назад

    ok. I just looked at your github repo for the useReducer example. I have to say I have struggled with redux and useReducer, and just like that as soon as I see your repo, I can actually see what is happening. I have looked at soooo many different tutorials and I swear they just confuse me more. You are an amazing teacher, thank you Dave!!

  • @yumisunday7088
    @yumisunday7088 Год назад

    This is great! i was falling asleep reading the react-redux documentation and not looking forward to checking out redux-toolkit but this is a great tutorial thanks!

  • @jaymartinez311
    @jaymartinez311 Год назад

    I’ve watched 12 minutes of the video and I’m already understanding. I got scared of redux for years. Went to vuejs and got a job but after all these layoffs (including myself) I had to comeback to react 😂 there are to many jobs right now in react for DOD especially surprisingly (Army Vet) that it’s my way back in the game. 💪🏾 I want to thank Dave for providing this for free! The job market sucks for Jr’s like me (i’m 40. discovered tech late) so I appreciate the content! I’m gonna go through your series and hopefully I get back on track!

  • @ryanmamboudjemtchemeu4289
    @ryanmamboudjemtchemeu4289 Год назад

    Thank you Dave Gray. I've been struggling with redux toolkit before I found your video

  • @artiliciousbysejal4862
    @artiliciousbysejal4862 Год назад

    was actually struggling with redux toolkit, and this video explained everything so well! Thank you👍

  • @alirezahekmati7632
    @alirezahekmati7632 2 года назад +1

    thank you! your content is GOLD! waiting for next js tutorial. 💥🔥

    • @DaveGrayTeachesCode
      @DaveGrayTeachesCode  2 года назад

      Thank you! 🙏 I am excited about starting a NextJS series this year. 💯🚀

  • @CTILET
    @CTILET 2 года назад

    Ooo thank you alot! When i began to study something you post a new video about it! It is amasing!

  • @johnacsyen
    @johnacsyen Год назад

    'Strive for progress over perfection', I really like this quote. This video explains concisely about Redux toolkit. Used to dislike Redux

  • @Kamim78
    @Kamim78 2 года назад +1

    Excellent style of teaching. Thanks Dave!

  • @georgejoseph2601
    @georgejoseph2601 Год назад

    This is pretty neat. Got the whole idea down while watching it at 2x. You’re an astounding teacher. Thanks.

  • @MohammadWaseem-po2kq
    @MohammadWaseem-po2kq 5 месяцев назад

    finally i found A gem, I was loooking for this tut..

  • @arasefe
    @arasefe 2 года назад

    A part from the tutorial, loved the shift+alt+down tip to copy the whole block below. Thanks

  •  2 месяца назад

    Great video Dave!!! 🎉🎉 Could you please make the same tutorial using TypeScript? It would be extremely helpful

  • @ajayramola9386
    @ajayramola9386 Год назад

    This was the best redux tutorial thanks Dave. You are a great teacher!

  • @DineshVutukuru
    @DineshVutukuru 2 года назад

    Just when I thought I couldn't find any better videos, I find your videos.

  • @enriquefavila3847
    @enriquefavila3847 2 года назад

    Thank you so much man, I just discovered your channel and it is fantastic! Keep it up!

  • @Daniel-nb3kk
    @Daniel-nb3kk Год назад

    Redux has never been so sexy to use before - thank you for the tutorial!

  • @lucasiramos
    @lucasiramos Год назад

    Amazing video! Can't wait to watch the whole series.... Thanks a lot for this work!

  • @zachariayussuf7652
    @zachariayussuf7652 9 месяцев назад

    Awesome content , love your teaching method.

  • @voice_famous_books4301
    @voice_famous_books4301 7 месяцев назад

    Thanks, best teacher for react:)

  • @arcosd63
    @arcosd63 2 года назад

    Hey Dave, this was excellent. Extremely well done.

  • @aya2222
    @aya2222 2 года назад

    Very clear and concise explanation!! Thank you so much!

  • @omarakki705
    @omarakki705 Год назад

    You are one of the best teachers dave

  • @andrewclarke6916
    @andrewclarke6916 2 года назад

    At last! React Redux Toolkit gets the Dave Gray treatment. Maybe I'll finally get to understand Redux thoroughly this time around.

  • @syedabuthahira8053
    @syedabuthahira8053 Год назад

    It was wonderful session which I have never watched in any channel and that 20 mins content was really made me to fully concentrated until the end of the vedio. Thank you so much for making this kind of vedio ❤️

  • @tanercoder1915
    @tanercoder1915 2 года назад

    are you reading my mind? I am getting ready for my interview where I expect a lot of questions about redux toolkit... and I am one day in learning redux... this video will be extremely helpful!

  • @rfryanfavour4369
    @rfryanfavour4369 2 года назад

    You just taught me more than redux toolkit
    thank you sir

  • @ajayshekhawat2292
    @ajayshekhawat2292 2 года назад

    you deserve many more subscribers learrned many javascript concepts from your video and best video on redux thank you

  • @dharmeshgohil9375
    @dharmeshgohil9375 2 года назад

    Loved all your tutorial

  • @pitsonborellio7463
    @pitsonborellio7463 Год назад

    You teach so well. woah, you make things so simple to understand

  • @penguincoding1353
    @penguincoding1353 2 года назад +1

    Thanks Dave that's super cool tutorial. redux-toolkit is a brand new from redux. This tutorial quite rare in youtube and you explain it in a simple way very easy to understand , You gotta one subs from me...

  • @regilearn2138
    @regilearn2138 2 года назад +1

    Wow,are you reading mind,just searching for thunk middleware,video uploaded,Thanks Dave,how many video yet to come on this topic

    • @DaveGrayTeachesCode
      @DaveGrayTeachesCode  2 года назад

      Glad to hear it! This will be a short series - guessing 4 to 6 videos - redux thunk coming very soon.

  • @ЂорђеЈеленковић
    @ЂорђеЈеленковић 2 года назад

    You are Dr. of this game! Please cointinue with everything about Redux. :)

  • @jacerchetoui709
    @jacerchetoui709 Год назад

    Man, you are a blessing, thank you !!

  • @luchonieves
    @luchonieves 2 года назад

    Top tier tutorial! Thanks for the video man, it's awesome.

  • @noir4356
    @noir4356 2 года назад

    Let's make it simple. You've helped me landing a job. Thank you :)

    • @DaveGrayTeachesCode
      @DaveGrayTeachesCode  2 года назад

      Great to hear! This is the feedback that lets me know I'm on the right track. Thank you for sharing!

  • @danieljing9319
    @danieljing9319 2 года назад

    nice stuff, awesome always, thanks Dave

  • @ZawCodes
    @ZawCodes 2 года назад

    This looks brilliant.

  • @Miles09
    @Miles09 Год назад

    Awesome video as always.

  • @wendixiao9275
    @wendixiao9275 2 года назад

    Thanks for the fantastic tutorial!!

  • @edwilsondasilva9946
    @edwilsondasilva9946 2 года назад

    I am Brazilian. Sorry for some language errors. Thank you for sharing your knowledge.

  • @jotarz96
    @jotarz96 2 года назад

    Thanks for this Redux tutorial !

  • @azizbekibnhamid642
    @azizbekibnhamid642 Год назад

    amazing course!

  • @tiril1991
    @tiril1991 2 года назад

    Amazing video, thank you so much!

  • @jenso413
    @jenso413 2 года назад

    a lot of channels do this, but be careful calling increment and decrement actions. They are actually action creators. It might not seem like it matters but it was really confusing to me at first, so I just wanted to clarify for anyone else confused. That is the reason why at 12:40 you call the functions to dispatch the action. You need to get the return value of the action creator, an action object, and then dispatch that

    • @DaveGrayTeachesCode
      @DaveGrayTeachesCode  2 года назад

      I think if you continue the series, you will hear me clearly define the action creators. It is a lot to take in as someone gets started with this. Hopefully, the series brings it all together. 💯🚀

  • @techadventures6645
    @techadventures6645 2 года назад

    I dont know yet everything I learned on React was smooth, short and simple.
    Never a lesson over 20 mins.
    But with redux ... only courses likes 2 hours minimum.
    I really hope this will save me time later, cause thats a huge time investment.

    • @DaveGrayTeachesCode
      @DaveGrayTeachesCode  2 года назад

      For smaller projects, I don't recommend Redux, but many want to know it because it is frequently used with enterprise / large projects.

  • @TheMaKaBaY
    @TheMaKaBaY 8 месяцев назад

    Nice tutoriel !

  • @ILohamLivingstone
    @ILohamLivingstone 11 месяцев назад

    the best programmer teacher ever

  • @Hero1Love2
    @Hero1Love2 7 месяцев назад

    Thank you 🙇🏾‍♂️ 🙏🏾

  • @marcostevanella6051
    @marcostevanella6051 Год назад

    Amazing, as always.

  • @younesseelkars8149
    @younesseelkars8149 9 месяцев назад

    Good quality content , thank you

  • @harag9
    @harag9 10 месяцев назад

    Great tutorial, thanks. you mentioned at the start the "toolkit" basically replaces the original redux and it's no longer needed, then later on you installed both as the "Provide" is still react-redux, So a little confused. do we still need to add both. I guess so.

  • @Norfeldt
    @Norfeldt 2 года назад

    A very fine walkthrough 👍👍👍 thank you very much for sharing this.
    In my opinion there is still a lot of code to write with redux compared to some alternatives (react context, valtio, etc.). Couldn't stop thinking that the dropping the named exports could "reduce" some of the lot of code writing that is needed.

    • @DaveGrayTeachesCode
      @DaveGrayTeachesCode  2 года назад

      Thank you! Yes, you are correct. We often give simple examples to show how Redux works, but unless the project is large, using something like the Context API or (in my opinion) Easy Peasy Redux is easier to implement. I do like the changes that have been made with Redux Toolkit vs the old standard of Redux.

    • @Norfeldt
      @Norfeldt 2 года назад

      @@DaveGrayTeachesCode yes, and slice seems like a much better name (thank you for explaining what that is all about).
      Imagine that using it with typescript would also improve the DX.

  • @jFernandoZ
    @jFernandoZ Год назад

    Nice Redux Toolkit overview! Bit Refreshing...!

  • @omarkraidie
    @omarkraidie 2 года назад

    You just got a new subscriber!!

    • @omarkraidie
      @omarkraidie 2 года назад

      You even had a motivational speech at the end!! damn this channel is fire 🔥

    • @DaveGrayTeachesCode
      @DaveGrayTeachesCode  2 года назад

      Thanks!

  • @mohammadmirzaei8716
    @mohammadmirzaei8716 2 года назад

    Awesome! Thanks! please make some videos about integrate test and e2e test in react with typescript

    • @DaveGrayTeachesCode
      @DaveGrayTeachesCode  2 года назад +1

      Coming up later this year! Thank you for the request! 🙏🙏

  • @sonamohialdin3376
    @sonamohialdin3376 2 года назад

    Awesome tutorial about redux thank you

  • @nicolasarcelin3220
    @nicolasarcelin3220 Год назад

    Spectacular, thank you

  • @willyhorizont8672
    @willyhorizont8672 2 года назад

    Thanks again dave, yesterday I was about to ask yo about using redux toolkit in useRefreshToken, useAxiosPrivate and useLogout hooks. I can't wait you make video for that also ;)

    • @DaveGrayTeachesCode
      @DaveGrayTeachesCode  2 года назад

      Thank you, Willy! Quick note on your question about combining Redux with the login strategies - Redux is the global state management. You would switch the state that needs to be shared throughout the app - like the auth state - to a Redux store and associated slice reducer. This is a good idea for a follow up video in that series. 💯🚀

    • @willyhorizont8672
      @willyhorizont8672 2 года назад

      @@DaveGrayTeachesCode yes I have remove the context api and refactor the hooks and use redux toolkit instead and its all works fine but still Im not sure if I code it the right way especially in the useAxiosPrivate.
      And yes I think its gonna be great content for next video :)

  • @mariusngaboyamahina9190
    @mariusngaboyamahina9190 2 года назад

    This is an amazing tutorial. Thank you! Are you planning to do videos for RTK Query as well?

    • @DaveGrayTeachesCode
      @DaveGrayTeachesCode  2 года назад +1

      Yes, I am. I cover all of the foundational skills for Redux Toolkit in the series first and RTK Query will finish out the series.

  • @syednoohu8692
    @syednoohu8692 2 года назад +1

    Those who wonder what createSlice will return ? , which will return an object that looks like:
    {
    name : string,
    reducer : ReducerFunction,
    actions : Record,
    caseReducers: Record.
    getInitialState: () => State
    }

    • @DaveGrayTeachesCode
      @DaveGrayTeachesCode  2 года назад +1

      Accurate! 💯 redux-toolkit.js.org/api/createSlice#return-value

  • @yonnie0521
    @yonnie0521 2 года назад +2

    thanks for the great video, very helpful. Im pretty confused the part at 9:08, that you import counterReducer from the counterSlice file, but i couldn't find the counterReducer in that file. would you mind to give me a hint? thanks!

    • @DaveGrayTeachesCode
      @DaveGrayTeachesCode  2 года назад

      Hi Yonnie - I'll try to help. If you go to the resources link in the description and view my source code for lesson 1, please look in the counterSlice file. At the very bottom of the file, you should see "export default counterSlice.reducer" ..The counterSlice we create above in that file has a reducer, and that is what is exported here and then imported at 9:08 as you referenced.

  • @hermangeku7461
    @hermangeku7461 7 месяцев назад +1

    Very greate, i learn more things

  • @BaoNguyen-yy3vw
    @BaoNguyen-yy3vw 2 года назад

    great video, thank you so much

  • @hardwired66
    @hardwired66 2 года назад

    thank you Sir for react redux tutorial help me alot, maybe next react testing tutorial.

  • @jomaramomas7682
    @jomaramomas7682 2 года назад

    Hey man thank you very much for this, really learned a lot. Btw, do you plan on adding a video about integrating with redux-saga?

    • @DaveGrayTeachesCode
      @DaveGrayTeachesCode  2 года назад +1

      Thank you! 💯 Yes, I want to do some tutorials on redux-saga in the future! 🚀

    • @jomaramomas7682
      @jomaramomas7682 2 года назад

      @@DaveGrayTeachesCode Looking forward to it!

  • @saidafzalabdusattorov6037
    @saidafzalabdusattorov6037 2 года назад

    Thanks , i hope you to make tutorial about Typescript ! Good luck ✊✊✊

  • @kulansky2002
    @kulansky2002 2 года назад

    Good tutorial buddy. Currently struggling on callin API for Data with Redux and TypeScript... Maybe u gonna do smth like this in the future?

  • @loussifchiheb8309
    @loussifchiheb8309 Год назад

    thanks for the great video ❤ may be you can do a redux toolkit with typescript vide and that wil be really apperciated and helpful nad thanks in advance ❤

  • @prasankumar4306
    @prasankumar4306 2 года назад

    need full playlist as soon as possible

    • @DaveGrayTeachesCode
      @DaveGrayTeachesCode  2 года назад

      Thank you - the playlist will be added to weekly until complete. 🙏💯

  • @dipanshusingh
    @dipanshusingh Год назад

    Love your videos.

  • @dilucsuki8470
    @dilucsuki8470 Год назад

    I got incredibly confused with the examples in docs, I hope this helps me understand how to add async state

    • @DaveGrayTeachesCode
      @DaveGrayTeachesCode  Год назад +1

      Later in the series, async thunks are covered. Even later, RTK Query is covered. Both are ways to issue async queries and update state.

    • @dilucsuki8470
      @dilucsuki8470 Год назад

      @@DaveGrayTeachesCode ty! I'm already in that part!

  • @jFernandoZ
    @jFernandoZ Год назад

    In the last part of the video, you use useState hook, and It looks like, just handle local/Component state, In order to make it global, You dispatch incrementByAmount action, Is This a common pattern to follow? I ask so, since, I'd omit useState hook. But Would IT affect performance app, Since, On this case manage local state is better than global.

  • @MyriadColorsCM
    @MyriadColorsCM Год назад

    Thanks for the tutorial, but I have a question: why use a useState to store the increment amount value when you could just create a new redux state on counterSlice?

    • @DaveGrayTeachesCode
      @DaveGrayTeachesCode  Год назад +1

      The official docs & tutorial may help further illustrate: redux.js.org/tutorials/essentials/part-1-overview-concepts#state-management

  • @mosqutio88
    @mosqutio88 Год назад

    Hey Dave! Which VSCode extension you installed to show you the opening and closing () ?
    Reference: 2:10 time mark and code lines 3 and 7. Thank you!

    • @DaveGrayTeachesCode
      @DaveGrayTeachesCode  Год назад

      This is built in to VS Code. Open Preference > Settings > search for "Bracket Pair Colorization" and enable it.

  • @tamerlanermanbet6331
    @tamerlanermanbet6331 2 года назад

    Beautifully Video!

  • @mohamedtarek5183
    @mohamedtarek5183 2 года назад

    you're the king of redux😀

    • @DaveGrayTeachesCode
      @DaveGrayTeachesCode  2 года назад +1

      I am far from the king, but thank you for the kind words! 😀🙏

  • @TravinskiyVladislav
    @TravinskiyVladislav 2 года назад

    What the difference between using React Effector and Redux? Can i use effector instead of redux?
    This is bad idea at the current time?

  • @siddiqahmed3274
    @siddiqahmed3274 2 года назад +1

    Sir your content is great. May God bless you for all the hard work you put in making these tutorials. Sir i have a request to make, though it is out of scope of this video... If you would make a tutorial how to use module css and global css together... For example, i have my base styling and utilities done in one style sheet. I want to use them throughout the app. But also i want to use some component specific styles... Is it even possible or we have to Duplicate the css? It would be great if you make a video over it or suggest some article to read. Thank you sir❤️

    • @DaveGrayTeachesCode
      @DaveGrayTeachesCode  2 года назад +1

      You can use more than one CSS stylesheet. For example, your index.css is at the top of the cascade and will apply to all. You can make a module stylesheet that will come after in the cascade and apply to a specific module and any child modules within the specific module.

    • @siddiqahmed3274
      @siddiqahmed3274 2 года назад

      @@DaveGrayTeachesCode hmm... I'll try that. Thank you ❤️

  • @Akshara-k3g
    @Akshara-k3g 8 месяцев назад

    thanks Dave

  • @afsertanveer75
    @afsertanveer75 10 месяцев назад

    8:56 how we imported counterReducer here whereas there wasn't anything like that from counterSlice file. Can anyone explain it?

  • @ДаниелДианов
    @ДаниелДианов 5 месяцев назад

    Do we need Redux with useReducer and useContext hooks?

  • @Tenshi_ZA
    @Tenshi_ZA Год назад +1

    As a super noob - I think you overcomplicated it by showing the increasebyAmount because now you threw in react states - which confused me a bit and its not pure redux alone anymore . should have just shown how to add by static value.

  • @gaudenciojiron7197
    @gaudenciojiron7197 Год назад

    Very nice course