Infinite Pagination Component With React Query

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

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

  • @akshatpandey2609
    @akshatpandey2609 9 หลายเดือนก่อน +26

    please make a video on Best Design Practices with React Query - with custom hooks, where we have a lot of api requests

    • @AbsolutePain
      @AbsolutePain 9 หลายเดือนก่อน +3

      Include auth context , react router dom too 👀

  • @hamzaeshoul
    @hamzaeshoul 7 หลายเดือนก่อน

    Very clear and easy to understand. Thank you so much for your dedication to all react developers !

  • @gufranlazuardi
    @gufranlazuardi 4 หลายเดือนก่อน

    Your explanation was very clear and easy to understand. Thank you!

  • @haghighi251
    @haghighi251 8 หลายเดือนก่อน

    Instead of using "Chapter X" please use a name that is relevant to each section title so we can jump to a specific part directly. It will be useful especially when we want to go to a specific part of the video without searching all Chapters :D. By the way, The video is so clear and useful. Thanks for making it.

  • @dnguyendev
    @dnguyendev 7 หลายเดือนก่อน

    concise, easy to understand, the best react-query pagination tutorial!

  • @98saiful
    @98saiful 9 หลายเดือนก่อน +1

    Love your new background!

  • @jomoc6112
    @jomoc6112 5 หลายเดือนก่อน

    I did not know there was such a thing as this. I have implemented the same output, but through a much harder path. :( . new subscriber here

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

    Nested ternaries for the win! :)
    Gr8 tutorial as always

  • @axechannel5589
    @axechannel5589 20 วันที่ผ่านมา

    Thanks bro! You are the best🤘

  • @MarselNz
    @MarselNz 7 หลายเดือนก่อน

    That's exactly what I wanted to know, thanks!

  • @mohamedsalimbensalem6118
    @mohamedsalimbensalem6118 9 หลายเดือนก่อน +5

    what if we fetched tooo many, the website will become laggy can you do a video how to do virtualization for performance...
    and what if the component can dynamically increase in size how can i still impliment the virtualization in this case ?

    • @tangaka3996
      @tangaka3996 9 หลายเดือนก่อน +1

      the react intersection observer returns a ref that will be used to check if its is in view and put to the very last item of a page.

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

    Very important, thanks.

  • @daniellchukwu
    @daniellchukwu 7 หลายเดือนก่อน

    If I could subscribe again, I absolutely would

  • @raviel_0422
    @raviel_0422 7 หลายเดือนก่อน

    Thank you. I need this

  • @everybodyguitar5271
    @everybodyguitar5271 16 วันที่ผ่านมา

    Any example in TypeScript? The same code can not run in TypeScript.

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

    Great video, thanks. Your volume on the microphone seems a bit low.

  • @worldofkent576
    @worldofkent576 9 หลายเดือนก่อน +2

    How would you Implement by scrolling upwards like messenger app, then refetch old data/message and grows the container upwards?

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

      In this example fetched items are added to the bottom of the list. But in your case we have to add at the top and keep the observer item on the top.

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

    Great video as always.
    I wonder why you use status instead of isLoading?

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

      Status works for error and loading, so no need for isLoading and isError

  • @godofwar8262
    @godofwar8262 9 หลายเดือนก่อน +2

    Please make a single video for typescrpit crash course

  • @yourlinuxguy
    @yourlinuxguy 5 หลายเดือนก่อน

    Very nice video but this will not work if you zoom out the page to the point that the last element doesn't touches the end scree. Then in that scenario load more pages won't fire. And thus the infinite scroll won't work. Just to keep this thing in mind.

    • @josephito27
      @josephito27 2 หลายเดือนก่อน +1

      those are edge cases, to start with.. why would anyone do that? and in such cases you can just render a "load more" button if the observer is on view the whole time, idk

    • @deanolium
      @deanolium 2 หลายเดือนก่อน

      From a UX pov, you'd want to actually put the observer ref on either one of the items before the last one, or at least make the observer div (though semantically that's ick) before there, so that it starts fetching before the user actually gets to the bottom of the list. Giving the illusion of being a real infinite list instead of one that has to buffer in whenever you get to the bottom.
      That said, useInview fires when the referenced component is in the viewport, not just when it crosses the bounds. So zooming out the page will still cause it to trigger.

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

    Will you create a video where you talk about React 19 ? It seems to be very interesting

  • @enriquesalomon8197
    @enriquesalomon8197 6 หลายเดือนก่อน

    using the infinite pagination, it is possible to implement it with a react-select? like a scrolling at a bottom will trigger the fetching the nextpage ? and also like searching in the select input if no data found in the cached , it will refecth again to the server side as a searching parameter, the return the data and added to the cached. ?

  • @FatahChan
    @FatahChan 9 หลายเดือนก่อน +1

    Doesn't this re-renders the whole items that was already fetched

  • @arpithagm2231
    @arpithagm2231 5 หลายเดือนก่อน

    is onSuccess being deprecated from useInfiniteQuery? If so, what is the alternative for onSuccess?

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

    Are you planning to come up with a React course ?

    • @cosdensolutions
      @cosdensolutions  9 หลายเดือนก่อน +1

      Yeah, coming out in a month!

  • @enriquesalomon8197
    @enriquesalomon8197 6 หลายเดือนก่อน

    I want to ask , in using react-select with reactjs, react query and supabase stack, i want to load all the data from the supabase that is almost 200000 of data, the problem is only 1000 is being display in the react-select, as we know displaying large of data into client side may effect performance, and what solution can be use in order to display all tha data in the react-select?

  • @JoshLearningFrontend
    @JoshLearningFrontend 9 หลายเดือนก่อน +1

    Create a video describing the react server component (RSC)

  • @Ray-ko6cw
    @Ray-ko6cw 8 หลายเดือนก่อน

    Than you bro :)

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

    What's the best way to handle toggle switches i have a page with a lot of them and i don't like the large amount of states?

  • @widurahasta9473
    @widurahasta9473 3 หลายเดือนก่อน

    do you know how to create infinite scroll up to load history chat like whatsapp? i'm struggle do it

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

    How can we do this in nextjs 14 server components ?
    I mean without reactquery and useEffect

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

    The link to the repository I think it sends to the wrong project

    • @cosdensolutions
      @cosdensolutions  9 หลายเดือนก่อน +1

      you're right, fixed. Thanks!

  • @Temp-pn4lm
    @Temp-pn4lm 6 หลายเดือนก่อน

    Wish you told me how to actually use the hook instead of one example.
    my back-end works way different than watch dummy code you represented so the video was useless to me