React Query Crash Course

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

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

  • @aznjokeryou
    @aznjokeryou 2 года назад +56

    Nice video, thank you! Just want to point out that they reason why even with 3G throttling the Next button didn't get disabled is because you put "&&" instead of "||". Since data.info.next for all but one (the last page) is not null, !data.info.next would evaluate to false, which means disabled is also false.
    Timestamp: 36:30
    Otherwise, great job!

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

      another way i got to see the effect of this was to remove it from display when true. with the 3G throttling it was wholesome😉
      {!isPreviousData && (
      setPage((prev) => prev + 1)}
      >
      Next
      )}

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

      @@joshuaebhoria8046 sorry, what does the ?. mean in your code
      Ah so if not null then you will access its prop, right?

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

      @@atvonguyentien5726 It's used to check undefined

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

    Thank you Laith, you literally saved my life!

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

    First time got o/p in RUclips react videos tq u so much

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

    Thanks, If I hadn't seen this today, then I'd be implementing my own React Query to cache paginated responses in the next few days.
    Saved me a lot of work.

  • @canerkuru3046
    @canerkuru3046 2 года назад +11

    Laith you are absolutely the best teacher ever! I learned so much from you and still keep learning every day. Thank you so much for your time and effort. Can't wait to see more React stuff on your channel!

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

    😎Ohhh.... what a easy way of delivering complex thing. 🤩😇

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

    laith upload i liek!! man, your teaching helped me so much these last month. i hope you will reach millions subs!!

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

    This library has single-handedly made my developer experience so much better. Happy to see you covering react-query on your channel.

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

      Do you use another state manager with it, as I heard it's not supposed to be a replacement for something like Redux but specialize in asynchronous api calls, thanks.

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

      @@lardosian React Query is for server state, for UI state you can use Context, Redux etc...

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

      @@ckh8217 Yes that's what I was getting at, so an app would need 2 providers then.

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

      Wanna know how to use react query with redux-toolkit

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

      @@bishnudas3562 By using the inbuilt RTK Query

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

    Holy moly, straight to the detail and explained clearly and very concise. Thank you.

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

    wow black on a very dark gray bg is the 2022 trends I guess

  • @danielmoralesgonzalez4908
    @danielmoralesgonzalez4908 2 года назад +4

    Awesome, thanks for the tutorial.
    Hoping for a 2nd part covering mutations!

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

      Also looking forward to the 2th part.

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

    best react query lesson at all , very clear

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

    Thank you so much for creating this tutorial. It helped me a lot in case of better understanding of React Query.
    Thanks once again. Looking forward for more!

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

    Best Tutorial on React Query that covered critical techniques. Thank you sir

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

    I actually had to speed down to 0.25 to notice the loading state which was very weird.
    Very good video well done.

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

    Thank you for this upload. It helped me to use react-query .

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

    I didn't know this API existed! Pretty excited to integrate this into discord!

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

    Wow react query sure is a lot easier then implementing my own caching system lol. Thanks for the tutorial!

  • @suatbayrak2703
    @suatbayrak2703 2 года назад +4

    great tutorial, covering critical parts like query strings and pagination, thank you.
    I have a question, I couldnt fully understand the purpose of isPreviousData.
    Is it just for user to not let press previous button before the data is fetched ? to prevent our actual data to be messed up?

    • @laithacademy
      @laithacademy  2 года назад +4

      By saying that we want to keep the previousData until we fetch the new ones, we have to first check if we are in the previous data state (because requests take time). If that is the case, we want to disable the next button because we don't want them to press it again in the middle of a fetch. Therefore we use the isPreviousData property to check this

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

      @@laithacademy sir gith hub actions and ci cd crash course if possible sir , really thanks for your tutorials it helps alot for starting up with new technologies

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

    고맙습니다. 항상 큰 도움이 되고있어요!

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

    Amazing learnt so much

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

    Love your content👍👍👍

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

    Really Amazing 🔥

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

    It's easier than it looks. I found learning soft design (like setups - I use SERUM) much more scary but it's doable, you just gotta be

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

    Very nice and concise

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

    I can never quite get auto import to work as well as I see in these excellent videos 😅

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

    Amazing video and use || instead of && in last duration of the video in button

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

    @10:19 you say that's a common issue, could you explain how to fix that issue?

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

    Was struggling to get the request working, status always went from loading to error.
    Reading the Github of react-query, I found out useQuery requires an array as first argument and not a string. Maybe it changed along the way... I'm using v4.0.0.

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

    Clicked the video taught it was from traversy media 😅. But still great content overall

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

    Awesome +++++++++++ 😀

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

    From where you edit your videos

  • @imran-baitham
    @imran-baitham 2 года назад

    it"s Help full Thanks

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

    For the fetching without React/Tanstack Query why not add a try/catch with loading/error state? This would really show how much work this is.

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

    Awesome video ++++++ 😃

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

    Hi , a little doubt, when I use react query (useQuery) with the same id, in different components, every time the component is mounted it re-fetches the data without using the cache. Do you know what the problem is if you want to get the same data in different components without calling the server again?
    Greetings.

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

    You should make playlists.

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

    Awesome !

  • @abubakar-emumba
    @abubakar-emumba 2 года назад

    Hey laith thanks for the videos, Please make a video on SWR

  • @arno.claude
    @arno.claude 2 года назад

    Thank you!

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

    Now you have to do SWR so next.js people don't feel left out,,, LOL

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

    nicely explained

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

    good keep uploading

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

    good

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

    Why does, with the introduction of every 'new' or 'on trend' library/code style etc, every tutorial video like this come with the 'it was a bit of a hassle doing it this way' speech when it made it 10x better than what we had before that. So weird.

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

    Forgot important feature. Which is using cached data from another component!

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

    What was that nifty .container shortcut you did at 22:50?

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

      just found it is emmet!! so glad to have found this

  • @rahuljoshi8331
    @rahuljoshi8331 2 года назад +3

    Where is Angular part 2 and 3 ???

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

    Sir, i learned React Js.. now will i switch to Remix js or Next js?

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

    40 40 tooth bruh.

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

    {2022-11-15}, {2022-11-22}

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

    Already out of date