Тёмный

How to Create Infinite Scroll in React | TanStack React Query 

Cand Dev
Подписаться 15 тыс.
Просмотров 15 тыс.
50% 1

In this video we are gonna learn how to create infinite scroll in react, we can use button "load more" to show more data, also we are gonna use "react-intersection-observer" to make it auto fetch when we scroll down.
👨‍💻Code:
github.com/candraKriswinarto/...
🔗Source:
[api] jsonplaceholder.typicode.com/
[react-intersection-observer] www.npmjs.com/package/react-i...
[react-query] tanstack.com/query/latest/doc...
[vite] vitejs.dev/guide/
👋🏻
mynameischand.tech
👉Timestamps:
0:00 - Intro
01:08 - Generate React.js with vite
02:49 - Fetch data & styling
11:07 - Install Tanstack React Query
12:40 - How to use useInfiniteQuery
28:38 - How to use react-intersection-observer
🌎 Find Me Here:
Instagram : / candra_kriswinarto
GitHub: github.com/candraKriswinarto/
Linkedin: / candra-kriswinarto
#programming

Наука

Опубликовано:

 

26 июн 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 38   
@yamelamadorfernandez7416
@yamelamadorfernandez7416 5 месяцев назад
It serves the purpose very well, I came in not knowing about infinite scroll and went out knowing, that is enough for me. Thanks bro.
@ahmedaq9018
@ahmedaq9018 5 месяцев назад
this is so clean .... thanks a lot for everything Cand
@0xtz_
@0xtz_ 8 месяцев назад
Yo thanks man 😂I was looking for this this morning hhhh and now I got it amazing videos keep going
@CandDev
@CandDev 8 месяцев назад
Thanks for the RU-vid algorithm 😁
@gaganyt7861
@gaganyt7861 8 месяцев назад
I watched a video about paginated queries in React Query three days ago. Since then, I've been trying to learn about infinite scrolling in React Query, but my search on RU-vid didn't yield helpful results. I struggled to grasp the concept and even considered switching to another library. Now, coming across this video, it feels like god sent you to make a video about infinte scrolling to help me out.
@CandDev
@CandDev 8 месяцев назад
God bless you bro
@voldemortvi4264
@voldemortvi4264 8 месяцев назад
amazing video as always !
@julienheng3880
@julienheng3880 2 месяца назад
Your explanation is very clear and easy to follow through. Please continue to make more tutorials. Thank you very much!
@SergieArizandieta
@SergieArizandieta 6 месяцев назад
ty buddy u really help me, other videos has a too complicated code and with gross explanation to explain this subject, ty again I hope u continue with this kind of tutorials :,)
@mdkawsarislamyeasin4040
@mdkawsarislamyeasin4040 3 месяца назад
Bro you save my huge time. I was looking for this.
@cleverprogrammer7409
@cleverprogrammer7409 8 месяцев назад
Amazing Amazing I was looking many days thanks alot
@leevu12
@leevu12 21 день назад
Thank you so much! clear explaination sir
@socialultra7219
@socialultra7219 3 месяца назад
thanks dude, this really helped me out
@jhonvaron1721
@jhonvaron1721 5 месяцев назад
Exelente ejemplo , muchas graciass 🥳
@delovoy_mikhail
@delovoy_mikhail 3 месяца назад
братишка, дай бог тебе здоровья. В твоём видео всё что нужно. Внатуе красава!
@ahmedaq9018
@ahmedaq9018 5 месяцев назад
i've seen many videos for you,, they are always simple, direct and to the point... hopefully you will consider creating a TanStack tutorial where you go through it all in practical way (the same way you do).-- 🥰🥰🥰
@asifkabiremon
@asifkabiremon 6 месяцев назад
This video content is really awesome and helpful to me
@FaizSultan430
@FaizSultan430 Месяц назад
thank you so much for deep explanation i was struggling with infinite scrolling in react query i watched a lot of videos on youtube but your video is best ❤
@CandDev
@CandDev 29 дней назад
Thank you 🤍
@shubhamupadhyay3174
@shubhamupadhyay3174 3 месяца назад
thank you it help me a lot
@mahamatabakarbechir7324
@mahamatabakarbechir7324 3 месяца назад
Thanks a lot :)
@banksom2861
@banksom2861 4 месяца назад
Thank you very much
@user-rl9xn1fl3i
@user-rl9xn1fl3i 5 месяцев назад
hello i'm korea developer student !! i've seen many many videos about introduce, your videos really good!!! I appreciate it... maybe i always watching your video everyday
@CandDev
@CandDev 5 месяцев назад
Hello Korea 👋🏻, thank you so much for your nice comment.
@Hunterhuni
@Hunterhuni 7 месяцев назад
Hey, really nice video, I really appreciate it. Just one question: How would I achieve the same thing but in reverse order? Meaning the list starts from the bottom and whenever the user scrolls up more data is loaded?
@favourz1
@favourz1 7 месяцев назад
array.reverse()
@zunnoorainrafi5985
@zunnoorainrafi5985 7 месяцев назад
brother I have a question, I used useInfiniteQuery in nextjs and I am fetching all blog posts in the function of useInfiniteQuery, as our data is coming from {data} = useInfiniteQuery({...}) and we can't use useInfiniteQuery in "server component" so I made my component a "client component" but I want that all my blog posts should be fetched in server component for less initial load content time and i also want infinite scroll on the main page of all blog posts. So how i can do this?
@denys7567
@denys7567 7 месяцев назад
34:20 fix me if I'm wrong, but this approach leads to creating item innerRef={ref} for !each! last item for each page. So If you see a content which contains of 3 loaded pages - I will have 3 ref elements, so you will have an incorrect loading, because nextPageLoading will be triggered when you will see on for example the last element of first page (but after it you already loaded items from next 2 pages)
@vitorwindberg4212
@vitorwindberg4212 21 день назад
you are correct
@letthesuntalk
@letthesuntalk 4 месяца назад
What if I'm using components with imgs and stuff like that, how can I mantain the performance when I scrolled and rendered a lot of items? Thank you :]
@divyprakash4052
@divyprakash4052 2 месяца назад
How is it possible to pass functions in use effect dependency
@mdabdullahmamun333
@mdabdullahmamun333 4 месяца назад
i notice that useInfiniteQuery hook render multiple time for on render how can i fix this
@zunnoorainrafi5985
@zunnoorainrafi5985 7 месяцев назад
Assalamu alaikum, Thanks brother for this valuable content. How Old are you ? and from where you learn the most ? and will you tell me your favourite teachers on the internet?
@CandDev
@CandDev 7 месяцев назад
Wa'alaikumussalam, brother. I am 27 years old. I learn from documentation and find awesome code on GitHub from people around the world. Oh, and my favorite teacher is Brad Traversy.😁
@zunnoorainrafi5985
@zunnoorainrafi5985 7 месяцев назад
@@CandDev thanks brother for your kind response
@028-manikandan3
@028-manikandan3 7 месяцев назад
bro initialPageParam name given use query bro its getting error bro why?
@o.j1398
@o.j1398 5 месяцев назад
Nice video, but what about Horizontal infinite scroll?
@user-vv8cx1ls1l
@user-vv8cx1ls1l 5 месяцев назад
Just display flex and I think it will work good!
Далее
Infinite Pagination Component With React Query
14:58
Просмотров 15 тыс.
Turning trash into triumph, one can at a time!
00:18
Просмотров 3,4 млн
Infinite Scroll And Filters With React Query
10:39
Просмотров 26 тыс.
React Compiler: In-Depth Beyond React Conf 2024
15:16
Can React.js Render 1,000,000 Elements?
11:38
Просмотров 33 тыс.
ПОКУПКА ТЕЛЕФОНА С АВИТО?🤭
1:00