Redux-thunk Middleware | React Redux Series Part 7

Поділитися
Вставка
  • Опубліковано 4 лют 2025

КОМЕНТАРІ • 107

  • @shjohnson2941
    @shjohnson2941 3 роки тому +1

    Great... This helped it to FINALLY begin to make sense!

  • @arsalanahmad1832
    @arsalanahmad1832 3 роки тому +3

    I learnt redux from this series an year earlier, now I was stuck and was trying to deal with redux ascynchronously, I watched this again and I realized how much this series taught me, the video is still the same but I am with much more knowledge and skill, thanks to this video series and thank you TechSith !

    • @Techsithtube
      @Techsithtube  3 роки тому +1

      I am glad that you keep coming back to watch these videos, I feel great as a teacher.

  • @klausheino6986
    @klausheino6986 6 років тому +4

    You really made the complex subject seem so simple. I am learning to use redux and thunk and have had my nerves stretched by unclear tutorials, but this one was an exception. Liked and subscribed. Keep going :)

  • @ruchirai5775
    @ruchirai5775 5 років тому +5

    Nothing is confusing, Its plain simple and amazing !

  • @premrajsahu5277
    @premrajsahu5277 5 років тому +1

    i really learn a lot from your tutorials. These are the easiest tutorial available. I have completed one of the top udemy course on react/redux. But this is way better than that. Thanks for all the effort.

  • @tenzinwoeser6842
    @tenzinwoeser6842 3 роки тому

    Love this and the earlier custom middleWare which you created. Thanks

  • @thomasmatlock942
    @thomasmatlock942 6 років тому +5

    I’m guessing the 2 people who hit dislike don’t know what React or redux is. That’s about as good of an explanation as it gets

    • @JaphethAwah
      @JaphethAwah 10 місяців тому

      Man there are always haters out there, I started looking at redux from code, and most of it made no sense to me till I found his explanations, couldn't be clearer, followed the entire redux series. I think he is quite concise and explains so well, he even explained the word thunk hahaha.. With short and concise videos.

  • @kranthikumar5215
    @kranthikumar5215 3 роки тому +1

    You are a real guru of technology sir god bless you for providing such videos sir live long🙏

  • @daviddonadze221
    @daviddonadze221 6 років тому +5

    you are my favorite teacher that i never had. Thx for those cool videos

    • @Techsithtube
      @Techsithtube  6 років тому

      Thanks David, Its good know that I am able to channel the knowledge. :)

  • @kranthikumar5215
    @kranthikumar5215 3 роки тому +1

    clean and clear explanation i have ever seen 👌

  • @mallikarjunkittad3123
    @mallikarjunkittad3123 5 років тому +1

    Awesome tutorial, now i got basic redux , THAX lots sir

  • @noamkleiner8749
    @noamkleiner8749 6 років тому +3

    Awesome tutorial, I'm following the series and learning so quick!
    Thanks a lot!

  • @sivamurugans3228
    @sivamurugans3228 3 роки тому +1

    Awesome tutorial..! Good explanation

    • @Techsithtube
      @Techsithtube  3 роки тому +1

      Glad it helped! Thanks for watching!

  • @edgarnyc
    @edgarnyc 5 років тому +2

    Thanks for the video! Easy to understand, follow, and fully demonstrates how/why to use thunk. Thanks so much!

  • @ruchirai5775
    @ruchirai5775 5 років тому +1

    In love with your react series.Amazing explanation :)

  • @kajurajude1753
    @kajurajude1753 4 роки тому +1

    I love your tutorials

  • @milanpavlovic8141
    @milanpavlovic8141 11 місяців тому

    I love this explanation

  • @websitesandsoftwaresolutio2812
    @websitesandsoftwaresolutio2812 6 років тому

    Exceptionally well explained ! Cheers Man

  • @xiaokourou
    @xiaokourou 3 роки тому

    Awesome. Very clear

  • @nivaech
    @nivaech 5 років тому

    Awesome series, very helpful. Thank you, jedi

  • @sharmamanish3
    @sharmamanish3 6 років тому +5

    Brilliant and beautifully explained.

  • @nomangulkhan
    @nomangulkhan 6 років тому +10

    . *You're Great!*

  • @ATXpert
    @ATXpert 2 роки тому

    Really helping me man, struggling to get a job so I'm making a whatsapp project

  • @leannec6821
    @leannec6821 4 роки тому

    Awesome Tutorial! Thank you!

  • @subhashgn1775
    @subhashgn1775 3 роки тому +1

    Thank you man for your great effort to give the quality content. I Have question, "Reducers must not do any asynchronous logic, calculate random values, or cause other "side effects" but how these middleware achieve the asynchronous logic integration.

  • @sarojdash7210
    @sarojdash7210 3 роки тому +1

    Can we dispatch from a setTimeout in mapDispatchToProps() without thunk middleware ? will it have dispatch as closure property even if we don't use thunk? I just want to understand if we can make async call then dispatch without thunk or not. and if so then what is the purpose of thunk

  • @ГеоргийРукомин
    @ГеоргийРукомин 5 років тому +2

    Thank you.

  • @ravikamesh4763
    @ravikamesh4763 6 років тому +3

    Actions must be plain objects. Use custom middleware for async actions.
    This is the error you get if you try to use setTimeout or any async action.
    Hope it helps.

  • @syedkashanadil7240
    @syedkashanadil7240 5 років тому +1

    Thats really impressive.

  • @draganmilunovic2525
    @draganmilunovic2525 6 років тому

    You are the GREAT teacher. Thank you very much :))))

  • @aysommer
    @aysommer 5 років тому

    Thanks for you good video. It helped.

  • @nitishkesarwani4699
    @nitishkesarwani4699 4 роки тому

    Hello,
    While going through this tutorial,
    I had a doubt. That is...
    we are doing all of this just to make things async., we captured the action,
    now we said that (it's from your example) if we will first save the value to the server and then will update the state, but
    in this case: suppose the current state's value is 5 (which is showing on UI) and user clicks the ageUP button, then user would like to send the updated value to the server (which will be '6' in this example), but the updation will only take place when the action would reach reducer. Before updating the state, we have called the server via middleware...to save the value (which will be 5 not 6)
    How will I be able to send the updated value to server ?

    • @Techsithtube
      @Techsithtube  4 роки тому

      in that case you dont update value in the reducer. you simply set the new value in the reducer. this way the backend and frontend is sync.

  • @trader9559
    @trader9559 5 років тому +3

    Awesome :)

  • @cezar007dead8
    @cezar007dead8 5 років тому

    Grate job! Awesome tutorial!

  • @nickjunes
    @nickjunes 5 років тому +1

    It's funny how we have to create all this extra boilerplate just to bury the asynchronous functions more and more without any actual gain.

  • @jiahaoyu855
    @jiahaoyu855 6 років тому +1

    You are the best! If you have made some udemy class I would buy it!

  • @huanzhang4110
    @huanzhang4110 5 років тому +2

    You should probably switch around the names of ageUp and ageUpAsync. Its a little confusing as in the video the asynchronous function is called ageUp, and the synchronous function is called ageUpAsync xD

  • @emanuel5207
    @emanuel5207 6 років тому +4

    how does 'dispatch' parameter come in on ageUp function?
    export const ageUp = val => {
    return dispatch => {
    setTimeout( () => dispatch(ageUpAsync(val)), 2000 );
    }
    };

    • @sivanesh-s
      @sivanesh-s 5 років тому

      That will be Provided by the redux-thunk middleware. Which gets this function returned in ageUp() and calls it with dispatcher argument

    • @djslimcodes2337
      @djslimcodes2337 5 років тому

      @@sivanesh-s Is it necessary
      to call it dispatch?

    • @sivanesh-s
      @sivanesh-s 5 років тому

      @@djslimcodes2337 Not really it is just the argument. You can name it anything

    • @zation99
      @zation99 5 років тому +1

      ​@@sivanesh-s Exactly, for example the video named it 'dispach' which I believe is a typo. But that well (accidentally) illustrates the idea that it is just a parameter name XD

  • @shijunli
    @shijunli 6 років тому

    Good explanation

  • @salahmadih8478
    @salahmadih8478 6 років тому

    You are the best, thank you

  • @infotainment7123
    @infotainment7123 4 роки тому +2

    when you imported actionCreator from actions... i am getting error on this.. apparently there is no actionCreator in actions.js

    • @jojiharada
      @jojiharada 4 роки тому

      getting the same. will let you know if I figure it out.

    • @jojiharada
      @jojiharada 4 роки тому

      change the import statement to:
      import { ageUp, ageDown } from './store/actions/actions';

    • @jojiharada
      @jojiharada 4 роки тому

      Also just noticed that he adds:
      import * as actionCreator from "./store/actions/actions';
      which solves the problem.

  • @djslimcodes2337
    @djslimcodes2337 5 років тому

    at 14:46 can we place dispatch(loading()) above return? i guess we cant but why?

    • @HoangVu-lr8mh
      @HoangVu-lr8mh 5 років тому +1

      As you could see, dispatch is a parameter which is a function, so if you place dispatch(loading()) above the return statement, dispatch is undifined.

  • @miroslavvalkovic9144
    @miroslavvalkovic9144 3 роки тому

    Can you point me to that "Server interaction video" please? thank you

  • @umardarazkhan4817
    @umardarazkhan4817 6 років тому

    you told in this vedio that u are going to make another one in which u would show the get and post on server with redux implemented .. where is it sith?? can't find it ? by the way u are running an awsome tutorial series on ur own

  • @thanvezahmed3866
    @thanvezahmed3866 6 років тому

    Hi at 5.18 Ur import action creater from store/action/action Wer is this action creation declared in that file?

    • @Techsithtube
      @Techsithtube  6 років тому +1

      If its a default export you can name it whatever when you import it. Basically actionCreater becomes action

    • @thanvezahmed3866
      @thanvezahmed3866 6 років тому

      Got it. Thanks buddy :-)

  • @AdityaNaik12
    @AdityaNaik12 6 років тому +1

    In setTimeout why we need to add dispach, can we just call ageUpAsnc, dispatch is already there in mapDispachToProps. Tried to figure it out but still not getting it.

    • @Techsithtube
      @Techsithtube  6 років тому +1

      basically for async actions, we need to dispatch an event from mapDispachToProps then catch it with the redux thunk, and finish the async evert ( which is just settimeout in this case) and then dispatch it again to it with reach the reducer.

  • @atul803
    @atul803 5 років тому

    why state. loading is not mapped with reducer state{}. Please confirm, without mapping in reducer we are changing the state true. Is this the correct way?

  • @ivanbadyulya5562
    @ivanbadyulya5562 6 років тому +1

    What extension do you use to highlight a code block? :)

  • @kianitify
    @kianitify 6 років тому +1

    that was awesome

  • @johncreativeproducts5688
    @johncreativeproducts5688 6 років тому +1

    NICE TUTORIAL!

  • @venkatpenubothu4805
    @venkatpenubothu4805 6 років тому +1

    Great!

  • @thanvezahmed3866
    @thanvezahmed3866 6 років тому

    Any plans of you doing videos on Epics redux observable

    • @Techsithtube
      @Techsithtube  6 років тому

      Not at the moment but I will put it in the queue of videos to make :)

  • @aishwaryshah3823
    @aishwaryshah3823 4 роки тому

    Kem cho sir ?
    tame react easy kari di du :)
    Thank You.
    Sir tame tips and tricks regarding video banao ne on react. please

    • @pkmkb_0
      @pkmkb_0 4 роки тому

      muze south ind laga

  • @gottedev79
    @gottedev79 5 років тому

    you are awesome

  • @NandhuKishorReddy
    @NandhuKishorReddy 6 років тому

    Please help me..While refreshing page my redux state is clearing why....

  • @leartmorina5037
    @leartmorina5037 5 років тому

    Hey I'm struggling with redux my question is if i say switch(action.type) { case goap: return newstate default: return state } my question is when i dispatch the action goUp(1) i got count: undefined why this happen to me

  • @agalligani
    @agalligani 4 роки тому

    Where is the next video?

  • @nanasarathi
    @nanasarathi 6 років тому

    Awesome

  • @iliketocode6986
    @iliketocode6986 3 роки тому

    Isn't a thunk just a promise then?

  • @sawyer303
    @sawyer303 5 років тому

    Hurts my ears when I hear him say basically ^^

    • @sawyer303
      @sawyer303 5 років тому

      Beisicaliii, I'm fkn dieing right here

    • @sawyer303
      @sawyer303 5 років тому

      Again :)))

    • @sawyer303
      @sawyer303 5 років тому

      @techsith lmgtfy.com/?q=basically+pronunciation Other than this, thank you! Lovely content ^^

  • @deathmachine808
    @deathmachine808 5 років тому

    Yeah but you're not actually awaiting it in the calling code... so you don't know if / when if finishes / succeeds or fails...

  • @bleonmorina2986
    @bleonmorina2986 5 років тому

    can i translate your video in albanian language?

  • @indowestlife
    @indowestlife 6 років тому +2

    *dispatch

  • @becky2casandra810
    @becky2casandra810 5 років тому

    i hate small screen :(

    • @Techsithtube
      @Techsithtube  5 років тому +1

      Sorry, its very hard to display this in a zoom . Were you watching on mobile device?

  • @einfacherkerl3279
    @einfacherkerl3279 11 місяців тому

    tutorial is good but honestly, redux is outdated like a dinosaur. there are better options now like reactquery and whoever is learning redux now must have been living under a rock

  • @rommyarb
    @rommyarb 5 років тому +1

    Please fix your spelling sir

    • @Techsithtube
      @Techsithtube  5 років тому +1

      Unfortunately, I can't fix it after the release of the video. But, I can be careful next time. I am not a great speller but I make up the short comings with my coding skill. :)

    • @hovhannes4628
      @hovhannes4628 4 роки тому

      What mistake is it about, can you indicate the minute, Please?

  • @dhairyadudhatra278
    @dhairyadudhatra278 4 роки тому

    volume is too LOW

  • @handsome_man69
    @handsome_man69 6 років тому +2

    seen

    • @Techsithtube
      @Techsithtube  6 років тому

      Thanks for a comment felix. :)

    • @handsome_man69
      @handsome_man69 6 років тому

      @@Techsithtube youtube is really bad at tracking which videos I have seen, so I put a "seen" in all the videos comments i see, so i know i've seen it

    • @Techsithtube
      @Techsithtube  6 років тому

      :) its a good idea. You can also create a playlist of seen videos .

  • @nehajain7720
    @nehajain7720 2 роки тому

    Brilliant and beautifully explained.