Understanding Generator Functions & Using Redux Saga

แชร์
ฝัง
  • เผยแพร่เมื่อ 23 พ.ย. 2024

ความคิดเห็น • 50

  • @sivach8667
    @sivach8667 3 ปีที่แล้ว +8

    Much better, useful and concise than redux-saga documentation. Thanks a lot.

  • @Yetipfote
    @Yetipfote 4 ปีที่แล้ว +14

    So the benefits over thunks is that it isolates side-effects away from actions so your actions become easier to test? Downside is you need to get that generator functions concept.

    • @Aman-Verma
      @Aman-Verma 2 ปีที่แล้ว

      Also synchronous looking code, which is also possible in thunk using async-await. I think no matter from where I learn about saga. I willa always have doubts regarding it

  • @tusharsinghal1333
    @tusharsinghal1333 2 ปีที่แล้ว +1

    can you please share the deck used in this video, this was a very clean explanation.

  • @steverogers9453
    @steverogers9453 7 ปีที่แล้ว +47

    This is a great explanation of how Redux-Saga works. Great presentation.

    • @les2997
      @les2997 7 ปีที่แล้ว +2

      No filler

  • @hasnainabbasdilawar8832
    @hasnainabbasdilawar8832 5 ปีที่แล้ว +12

    To the point and no bs! Great presentation!

  • @rediettadesse5488
    @rediettadesse5488 9 หลายเดือนก่อน

    One of the best explanations of saga, Thank you!!!

  • @santosharakere
    @santosharakere 3 ปีที่แล้ว +3

    Great presentation. To the point and very very clear. Thank you.

  • @santosharakere
    @santosharakere 5 ปีที่แล้ว +4

    Short and sweet presentation. Thanks

  • @agacini
    @agacini 6 ปีที่แล้ว +6

    one of the clearest explanation ever. thank you so much!

  • @Abdullahtariq52
    @Abdullahtariq52 6 ปีที่แล้ว +2

    The best resource on redux-saga so far

  • @RealEstate3D
    @RealEstate3D 4 ปีที่แล้ว +1

    Crazy enough.... but this still is the best explanation of sagas ... and btw generators also .. yield* with the asterisk I even never saw in practice

  • @NguyenNguyen-th2eo
    @NguyenNguyen-th2eo 3 ปีที่แล้ว +1

    thank you, your presentation really makes my day 😀

  • @damilolaolukoju5163
    @damilolaolukoju5163 4 ปีที่แล้ว +3

    best explanation on redux-saga

  • @mmsikoras
    @mmsikoras 7 ปีที่แล้ว +7

    Very nice explanation without not needed complexity. Thanks

  • @aitfrihaZaid
    @aitfrihaZaid 2 ปีที่แล้ว

    Thanks a lot for this explanation. I have only one question in generator function when the first yield finish who call the second yield put ? i think we must have .next() some where

  • @shvedavika
    @shvedavika 3 ปีที่แล้ว +1

    great explanation. thank you

  • @vinzbrain
    @vinzbrain 3 ปีที่แล้ว +1

    Good presentation. I am not completely sold though. Most of the points he makes can be covered by using async/await in thunks.

  • @subeshbhandari1652
    @subeshbhandari1652 6 ปีที่แล้ว +4

    Does saga run on separate thread (web worker) or the same main thread?

    • @tihomiraparichkova1581
      @tihomiraparichkova1581 5 ปีที่แล้ว +1

      In effect, Sagas runs on its own thread, which keeps the two blocks of code from interfering with each other.
      Image you have a database intervention, using sagas you will make this in the background, thus you avoid blocking the main thread.

  • @Faaaaaaaaaaaaz
    @Faaaaaaaaaaaaz 4 ปีที่แล้ว +3

    Why not to use async/await? These generators in saga makes code unreadable

  • @effeKtSVK
    @effeKtSVK 7 ปีที่แล้ว +1

    Agree with the guys below me, helped me too, I just hope I will be able to implement it into a React Native project now :D I couldn't find any docs on that, unfortunately

  • @SteveSonoa
    @SteveSonoa 6 ปีที่แล้ว

    This is a fantastic resource. Thank you!!!

  • @sumanthtalasila2521
    @sumanthtalasila2521 6 ปีที่แล้ว +1

    This really helps.Thank you.

  • @ashishkirodian9285
    @ashishkirodian9285 6 ปีที่แล้ว +1

    Great explanation. Thanks a lot!!

  • @feefifofum6383
    @feefifofum6383 4 ปีที่แล้ว +1

    Excellent!

  • @vishvajeetsingh9843
    @vishvajeetsingh9843 6 ปีที่แล้ว +1

    Can someone please tell me how yield select and yield fork works?? +FullStack Academy

  • @vanesaflores1863
    @vanesaflores1863 5 ปีที่แล้ว +1

    Question for anyone able to answer: Can you use Saga (just Saga) with React's Context API? (the Context API is another way to manage state instead of using Redux)

    • @creative-commons-videos
      @creative-commons-videos 5 ปีที่แล้ว +1

      saga is just a middleware, if you use redux then you can envoke all middlewares by official library or community based library (like thunk, saga) or your own library, it is just an observable pattern to watch some event to happend and according to that fire some more events that can be async, so, Let's talk about context api, first it does not support adding middleware yet, but you still can create your custom hooks like useSaga, and then in that hook, you can pass some events types references to observe. it will kinda work same but it too much manual work :)

    • @vanesaflores1863
      @vanesaflores1863 5 ปีที่แล้ว +1

      @@creative-commons-videos Great, I won't be using Saga. I agree, sounds like so much work. Thank you so much!

    • @siddharthpachori9302
      @siddharthpachori9302 5 ปีที่แล้ว +2

      Depends upon the requirements ,do not jump library to library just a suggestion, prefer vanilla jacascript if you will. If you require low frequency updates definately you should use context api ,it's lighter and simple to use, but if you require long running asynchronous requests and better understanding of these requests try to explore both thunk or saga ,they share the same goal but slight change in middleware consumption.

  • @AlfonGeek
    @AlfonGeek 7 ปีที่แล้ว +4

    the video referenced in the last slide is th-cam.com/video/9UZla3uIo3A/w-d-xo.html

  • @HerlesIncalla
    @HerlesIncalla 5 ปีที่แล้ว +2

    Cool!

  • @TheAidsaids
    @TheAidsaids 6 ปีที่แล้ว

    good explanation

  • @mdnazmulhaque9600
    @mdnazmulhaque9600 3 ปีที่แล้ว +1

    thanks

  • @feefifofum6383
    @feefifofum6383 4 ปีที่แล้ว +1

    Now add types...

  • @shripalm
    @shripalm 4 ปีที่แล้ว +1

    Thanks

  • @abiakhil69
    @abiakhil69 4 ปีที่แล้ว +1

    👌

  • @DarrenHwang
    @DarrenHwang 6 ปีที่แล้ว +10

    So happy we can speed up the playback speed to 1.5x

  • @ahmedmusawir
    @ahmedmusawir 6 ปีที่แล้ว +4

    Use a mic in your collar ... the volume up and down is extremely disturbing ...

  • @BaterieCZ
    @BaterieCZ 5 ปีที่แล้ว

    yeet

  • @danielxxgadd
    @danielxxgadd 6 ปีที่แล้ว +4

    Clearly knows his sage, but maybe want to liven up a bit. Also watch your video, mic issues!