Infinite Pagination Component With React Query

  Рет қаралды 13,178

Cosden Solutions

Cosden Solutions

3 ай бұрын

Repo → github.com/cosdensolutions/co...
Join The Discord! → discord.cosdensolutions.io
VSCode Theme | Font → Material Theme Darker | Menlo, Monaco "monospace"
In this video I will show you how to build an infinite pagination component with React Query. This component will be able to infinitely load multiple pages of data and show them all together on the screen as the user scrolls through the application. We'll be using Tanstack Query for this as well as react-intersection-observer, which is a library that will help us trigger a fetch of the next page. Enjoy!

Пікірлер: 34
@akshatpandey2609
@akshatpandey2609 3 ай бұрын
please make a video on Best Design Practices with React Query - with custom hooks, where we have a lot of api requests
@AbsolutePain
@AbsolutePain 3 ай бұрын
Include auth context , react router dom too 👀
@balls991
@balls991 2 ай бұрын
I watched and read so many tutorials about useInfiniteQuery, none of them explained the details. Thank you so much.
@hamzaeshoul
@hamzaeshoul Ай бұрын
Very clear and easy to understand. Thank you so much for your dedication to all react developers !
@98saiful
@98saiful 3 ай бұрын
Love your new background!
@penaf
@penaf 3 ай бұрын
Nested ternaries for the win! :) Gr8 tutorial as always
@MarselNz
@MarselNz Ай бұрын
That's exactly what I wanted to know, thanks!
@rin0422
@rin0422 Ай бұрын
Thank you. I need this
@ghostaccountlmao
@ghostaccountlmao 3 ай бұрын
Very important, thanks.
@haghighi251
@haghighi251 2 ай бұрын
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.
@Ray-ko6cw
@Ray-ko6cw Ай бұрын
Than you bro :)
@dnguyendev
@dnguyendev Ай бұрын
concise, easy to understand, the best react-query pagination tutorial!
@danielchukwu524
@danielchukwu524 Ай бұрын
If I could subscribe again, I absolutely would
@imatrules
@imatrules 3 ай бұрын
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 күн бұрын
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. ?
@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?
@mohamedyamani8502
@mohamedyamani8502 3 ай бұрын
Great video as always. I wonder why you use status instead of isLoading?
@cosdensolutions
@cosdensolutions 3 ай бұрын
Status works for error and loading, so no need for isLoading and isError
@waleedsharif618
@waleedsharif618 3 ай бұрын
Will you create a video where you talk about React 19 ? It seems to be very interesting
@catalincatalin4101
@catalincatalin4101 2 ай бұрын
Great video, thanks. Your volume on the microphone seems a bit low.
@mohamedsalimbensalem6118
@mohamedsalimbensalem6118 3 ай бұрын
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 3 ай бұрын
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.
@FatahChan
@FatahChan 3 ай бұрын
Doesn't this re-renders the whole items that was already fetched
@worldofkent576
@worldofkent576 3 ай бұрын
How would you Implement by scrolling upwards like messenger app, then refetch old data/message and grows the container upwards?
@Gokulakannannedunchezhiyan
@Gokulakannannedunchezhiyan 3 ай бұрын
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.
@godofwar8262
@godofwar8262 3 ай бұрын
Please make a single video for typescrpit crash course
@abhishek7056
@abhishek7056 2 ай бұрын
How can we do this in nextjs 14 server components ? I mean without reactquery and useEffect
@JoshLearningFrontend
@JoshLearningFrontend 3 ай бұрын
Create a video describing the react server component (RSC)
@dipanshusabharwal
@dipanshusabharwal 3 ай бұрын
Are you planning to come up with a React course ?
@cosdensolutions
@cosdensolutions 3 ай бұрын
Yeah, coming out in a month!
@fabioalcocersejas2944
@fabioalcocersejas2944 3 ай бұрын
The link to the repository I think it sends to the wrong project
@cosdensolutions
@cosdensolutions 3 ай бұрын
you're right, fixed. Thanks!
@Temp-pn4lm
@Temp-pn4lm 4 күн бұрын
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
React Query Is (Still) Essential - My Favorite React Library
11:04
Theo - t3․gg
Рет қаралды 138 М.
Why Did They Do This?! (Code Review)
18:48
Cosden Solutions
Рет қаралды 14 М.
SHE WANTED CHIPS, BUT SHE GOT CARROTS 🤣🥕
00:19
OKUNJATA
Рет қаралды 12 МЛН
Маленькая и средняя фанта
00:56
Multi DO Smile Russian
Рет қаралды 4,2 МЛН
How to Create Infinite Scroll in React | TanStack React Query
35:07
The problem with useEffect
11:37
Cosden Solutions
Рет қаралды 30 М.
Efficiently Render 100,000 Rows in React
16:41
Cosden Solutions
Рет қаралды 15 М.
10 common mistakes with the Next.js App Router
20:37
Vercel
Рет қаралды 171 М.
Infinite Scrolling in NextJs 13 Using Server Actions
17:58
Hamed Bahram
Рет қаралды 17 М.
My Favorite Update in a Long Time
10:08
Josh tried coding
Рет қаралды 28 М.
React Hook Form - Complete Tutorial (with Zod)
28:22
Cosden Solutions
Рет қаралды 73 М.
SHE WANTED CHIPS, BUT SHE GOT CARROTS 🤣🥕
00:19
OKUNJATA
Рет қаралды 12 МЛН