Infinite Pagination Component With React Query

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

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

  • @akshatpandey2609
    @akshatpandey2609 11 месяцев назад +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 11 месяцев назад +3

      Include auth context , react router dom too 👀

  • @hamzaeshoul
    @hamzaeshoul 9 месяцев назад

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

  • @gufranlazuardi
    @gufranlazuardi 5 месяцев назад

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

  • @jomoc6112
    @jomoc6112 7 месяцев назад

    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

  • @dnguyendev
    @dnguyendev 9 месяцев назад

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

  • @mohamedsalimbensalem6118
    @mohamedsalimbensalem6118 11 месяцев назад +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 11 месяцев назад +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.

  • @axechannel5589
    @axechannel5589 2 месяца назад

    Thanks bro! You are the best🤘

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

    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.

  • @98saiful
    @98saiful 11 месяцев назад +1

    Love your new background!

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

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

  • @MarselNz
    @MarselNz 9 месяцев назад

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

  • @FatahChan
    @FatahChan 11 месяцев назад +1

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

  • @worldofkent576
    @worldofkent576 11 месяцев назад +2

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

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

      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.

  • @everybodyguitar5271
    @everybodyguitar5271 2 месяца назад

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

  • @godofwar8262
    @godofwar8262 11 месяцев назад +2

    Please make a single video for typescrpit crash course

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

    Very important, thanks.

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

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

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

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

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

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

  • @raviel_0422
    @raviel_0422 9 месяцев назад

    Thank you. I need this

  • @daniellchukwu
    @daniellchukwu 8 месяцев назад

    If I could subscribe again, I absolutely would

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

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

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

    Are you planning to come up with a React course ?

  • @enriquesalomon8197
    @enriquesalomon8197 8 месяцев назад

    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. ?

  • @47joshua
    @47joshua 11 месяцев назад +1

    Create a video describing the react server component (RSC)

  • @arpithagm2231
    @arpithagm2231 7 месяцев назад

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

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

    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?

  • @enriquesalomon8197
    @enriquesalomon8197 8 месяцев назад

    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?

  • @widurahasta9473
    @widurahasta9473 5 месяцев назад

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

  • @yourlinuxguy
    @yourlinuxguy 7 месяцев назад

    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 4 месяца назад +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 3 месяца назад

      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.

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

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

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

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

  • @Ray-ko6cw
    @Ray-ko6cw 9 месяцев назад

    Than you bro :)

  • @Temp-pn4lm
    @Temp-pn4lm 8 месяцев назад

    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