How to use RxJS with React Hooks

แชร์
ฝัง
  • เผยแพร่เมื่อ 26 ม.ค. 2025

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

  • @kckunal2612
    @kckunal2612 4 ปีที่แล้ว +9

    By far the best, most-practical tutorial on RxJS with React that I've seen!

    • @twinthumb
      @twinthumb 3 ปีที่แล้ว

      Exactly, very clear and concise explanation of rxjs core concepts

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

    Today is the first day I've started looking into what RxJS is/does, and this is the most useful thing I've seen so far. Keeps it easy to follow and provides a real world use case. Thanks for sharing!

  • @mikhailshcheglov5912
    @mikhailshcheglov5912 4 ปีที่แล้ว

    God, I find it! The first normal explanation of how to use RsJS with React Hooks

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

    wow, you really make it clear and simple! thanks for the value my friend!

  • @realconect
    @realconect 4 ปีที่แล้ว +2

    So fast but succinct. Loved this, thank you very much!

  • @franciscolopez1464
    @franciscolopez1464 4 ปีที่แล้ว

    WOW! So much practical info in so short time! Thank you very much!

  • @mrstronciy1060
    @mrstronciy1060 3 ปีที่แล้ว

    4:52 I have error "Cannot read property 'unsubscribe' of undefined "

    • @mrstronciy1060
      @mrstronciy1060 3 ปีที่แล้ว

      Maybe the version of rxjs is the reason?

  • @BasicUse
    @BasicUse 3 ปีที่แล้ว

    13:24 Why you mix the use of await with then? Just by using await it's enough to retrieve the value in a variable, that mix of await and then to retrieve the value it's pointless

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

    You'll want to use switchMap, not mergeMap. Merge map will not unsubscribe from old fetches. However, I'm not sure fetch can be canceled, so it probably doesn't matter in this example. I wouldn't use promises to fetch data.

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

      there is a fromFetch Operator for that and yes, you can cancel the fetch if cancel token exists in that browser (it is not supported by all browsers). the other solution is fromAjax which is supported by all major browsers.

  • @nora8200
    @nora8200 4 ปีที่แล้ว

    Best video of Rxjs! Thank you so much!

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

    Great tutorial, honestly... I see a lot of tutorials but based on basic stuff that aren't really useful in the real world, unlike yours :)
    Many thanks

  • @MarkEdwardTan
    @MarkEdwardTan 4 ปีที่แล้ว

    Thanks so much for this. Explained very well and in detail for functional and class components. I come from Angular world so I like rxjs and is currently learning react. Subscribed 🙂

  • @MarkEdwardTan
    @MarkEdwardTan 4 ปีที่แล้ว

    This is much simpler than Redux and Context API in my opinion. Easier to use also and minimal boilerplate code to get started. Thank you :)

  • @js_pathfinder
    @js_pathfinder 4 ปีที่แล้ว

    Hi, thanks for the video! I wonder, do you have any idea how to get updated props of functional component inside subscription function? If we use useEffect(() => {...}, []) - then inside in subscribe handler we're not getting updated props :( Couldn't find a way to do it. If you add subscribe handler as external func and specify it in dependencies array - then it will re-initialize observable on every render :( Any ideas how to make it work in functional component? Thanks

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

    The setter from useState is stable, no need to pass it to the custom hook

  • @Xenon77x
    @Xenon77x 3 ปีที่แล้ว

    Can anyone tell me what font is he using

  • @quickfingers5982
    @quickfingers5982 4 ปีที่แล้ว

    Is rxjs better for managing states vs redux?

  • @iliketocode6986
    @iliketocode6986 4 ปีที่แล้ว

    Do you have course on this ill buy it asap please link rxjs react any resources appreciated

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

    very well explained, thanks!

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

    Great example thank you so much. Do you have a CRUD using React and RxJS?

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

    very good video thanks

  • @iliketocode6986
    @iliketocode6986 4 ปีที่แล้ว

    have any learning rxjs with react?

  • @bugrakadirhan7888
    @bugrakadirhan7888 4 ปีที่แล้ว

    RxJS' structure reminds me of TH-cam, where Observables are channels.

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

    laziness is a lot bigger than what you sed. it means it will not consume any memory until you subscribe, not like promises which are eager and will be executed as soon as define them.

  • @BboyKeny
    @BboyKeny 3 ปีที่แล้ว

    Beginner JS: Wow this language is awesome, you have so much freedom!
    Advanced JS: Wow this language is bad because it has too many quarks
    Master JS: Wow this language is awesome, you have so much freedom!

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

    Thanks Man

  • @zen-ventzi-marinov
    @zen-ventzi-marinov 5 ปีที่แล้ว

    I kind of liked it before even watching it, I mean a minute or two. Then, after finishing the video I got upset I could not upvote it again. First world, dev problems.
    Upvote if you don't give a shit.

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

    Thanks for your great tutorial :):)

  • @ceralguy85
    @ceralguy85 4 ปีที่แล้ว

    Great tutorial also great channel

  • @stonesnicola9439
    @stonesnicola9439 4 ปีที่แล้ว

    Looks great

  • @bakaleisanich
    @bakaleisanich 3 ปีที่แล้ว

    Thank you

  • @vidumini23
    @vidumini23 3 ปีที่แล้ว

    Thank you..

  • @PiyushChauhan2011
    @PiyushChauhan2011 4 ปีที่แล้ว

    I hear BXJS voice in this video!

  • @eguoli
    @eguoli 4 ปีที่แล้ว

    很棒!!

  • @ssthil1
    @ssthil1 3 ปีที่แล้ว

    Very useful one, thank you so much for the video.