Building React Infinite Scroll with useInfiniteQuery

  Рет қаралды 10,481

Monsterlessons Academy

Monsterlessons Academy

Күн бұрын

Learn how to implement React infinite scroll fast with useInfiniteQuery from React Query library. It is not an easy task to build infinite scroll from scratch this is why we will use 2 libraries which simplify implementation.
TIMESTAMPS
0:00 Introduction
1:19 Installation and configuration
2:18 Fetching data
4:19 Adding useInfiniteQuery
6:52 Preparing articles
8:06 Adding react infinite scroll
► CHECK MY COURSES - monsterlessons-academy.com/co...
MOST POPULAR COURSES
► Building real project with Angular + NgRx - monsterlessons-academy.com/co...
► Building real NestJS API - monsterlessons-academy.com/co...
► Javascript interview questions - monsterlessons-academy.com/co...
► Building real fullstack project - monsterlessons-academy.com/co...
► Mastering Git - monsterlessons-academy.com/co...
► Mastering Docker and Docker Compose - monsterlessons-academy.com/co...
► Building real project with React Hooks - monsterlessons-academy.com/co...
► Building real project with Vue + Vuex - monsterlessons-academy.com/co...
FOLLOW ME
► TWITTER - / monster_lessons
► INSTAGRAM - / monsterlessonsacademy
► TIKTOK - / monsterlessonsacademy
REFERENCES
► Source code - github.com/monsterlessonsacad...

Пікірлер: 23
@ahmadbenchakhtir5787
@ahmadbenchakhtir5787 Жыл бұрын
hi, I hope that you are fine. how we can do a swipeable angular component with handle the touch event for the phone and all those stuff... the hammerJs is very old right new...
@joshuagalit6936
@joshuagalit6936 11 ай бұрын
Thanks, it's perfect!!!
@MonsterlessonsAcademy
@MonsterlessonsAcademy 11 ай бұрын
Glad you think so!
@Dadaadad268
@Dadaadad268 Ай бұрын
lastPage.articleCount doesn't exist . How did you resolve this?
@joshuagalit6936
@joshuagalit6936 Ай бұрын
@@Dadaadad268 add object `count` in your query to sum up all the objects inside your array data
@Dadaadad268
@Dadaadad268 Ай бұрын
@@joshuagalit6936 but he has it as a member of 'lastPage' - how?!
@dimitridoroshko
@dimitridoroshko Жыл бұрын
Thanks, man. A very useful video. By the way, where are you from? :)
@MonsterlessonsAcademy
@MonsterlessonsAcademy Жыл бұрын
Originally Ukraine, now Germany
@dimitridoroshko
@dimitridoroshko Жыл бұрын
@@MonsterlessonsAcademy побратиме, як ся маєш?
@fnandesrafael
@fnandesrafael 10 ай бұрын
What about an API that doesn't provide an "articleCount" like that api? How can I handle this, because I'm trying to use this method with the fakeStoreApi but it doesn't exactly provide it.
@MonsterlessonsAcademy
@MonsterlessonsAcademy 10 ай бұрын
Then you cant do pagination with this data. You need either articlesCount or pagesCount.
@fnandesrafael
@fnandesrafael 10 ай бұрын
@@MonsterlessonsAcademyOh I see. So it's something that the API needs to supply right?
@9622AX
@9622AX Жыл бұрын
Show implementation on Local json file
@mahdirafi6537
@mahdirafi6537 6 ай бұрын
nice
@MonsterlessonsAcademy
@MonsterlessonsAcademy 6 ай бұрын
Thanks
@landsman737
@landsman737 5 ай бұрын
you are suggesting using a 3rd-party code with the last update 2y ago? why?
@MonsterlessonsAcademy
@MonsterlessonsAcademy 5 ай бұрын
I'm not sure where you are looking. It was updated 3 days ago github.com/TanStack/query
@landsman737
@landsman737 5 ай бұрын
@@MonsterlessonsAcademy I did a few clicks and saw it at 0:48
@MonsterlessonsAcademy
@MonsterlessonsAcademy 5 ай бұрын
@@landsman737 Ah okay you are talking about react-infinite-scroll-component. Well first of all I don't see a problem with package not being updated if it works as intended. Secondly you can skip using it and just add own logic of scroll end.
@domink321
@domink321 5 ай бұрын
You're not building Infinite Scroll. You are just installing a Infinite Scroll library and using it. The title of the video should be called "Using InfiniteScroll library with useInfiniteQuery"
@MonsterlessonsAcademy
@MonsterlessonsAcademy 5 ай бұрын
Yeap
@farjanahaque1054
@farjanahaque1054 5 ай бұрын
I dunno why bro grinds his teeth while talking
Usequery simplifies API Requests with React Query
12:01
Monsterlessons Academy
Рет қаралды 3,2 М.
Infinite Pagination Component With React Query
14:58
Cosden Solutions
Рет қаралды 17 М.
World’s Largest Jello Pool
01:00
Mark Rober
Рет қаралды 99 МЛН
НРАВИТСЯ ЭТОТ ФОРМАТ??
00:37
МЯТНАЯ ФАНТА
Рет қаралды 8 МЛН
From Beginner to Pro: Demystifying Angular Change Detection in Depth
12:56
Monsterlessons Academy
Рет қаралды 3,8 М.
Learn Infinite Scroll in JavaScript
14:11
The Code Creative
Рет қаралды 28 М.
What is PyTorch? THE UNOFFICIAL MOVIE
16:11
COMMAND
Рет қаралды 96
Supabase Tutorial 2024: The Complete Beginner's Guide
21:33
Monsterlessons Academy
Рет қаралды 967
Infinite Scrolling With React - Tutorial
25:28
Web Dev Simplified
Рет қаралды 355 М.
Build an INFINITE SCROLL using Next.js 13 Server Actions
12:48
Raj talks tech
Рет қаралды 13 М.
Infinite Scroll With React & React Query | Tutorial
19:03
Redhwan Nacef
Рет қаралды 13 М.
Prisma JS JWT Authentication: Complete Beginner's Guide
21:48
Monsterlessons Academy
Рет қаралды 518
Angular Production Deployment with UltaHost Web Hosting VPS Plan
11:28
Monsterlessons Academy
Рет қаралды 1,1 М.