Trying to implement infinite scroll with infinite query
So i was looking at this video to see how this guy implememented infintie scroll: https://www.youtube.com/watch?v=nzJsYJPCc80&t=3592s (his github repo in description, and the part of the video is labeled), and the way he made it is kind of glitchy, when I scroll down, it just fetches the same data over and over which happens in his video as well, and when I print the nextcursor, which is the id of the next record, its always the same for some reason.
I pretty much have the same code as him except I just have my own schema that i use instead of tweet, which shouldn't make a difference at all.
I pretty much have the same code as him except I just have my own schema that i use instead of tweet, which shouldn't make a difference at all.
YouTubeTomDoesTech
Repository: https://github.com/TomDoesTech/t3-twitter-clone
0:00 - Intro
1:06 - Bootstrap application
7:28 - Discord OAuth
10:41 - Create Tweet
35:35 - Seed database
37:40 - List Tweets
51:50 - Format dates with Day.js
54:00 - Cursor-based pagination
56:51 - Infinite scroll (useInfiniteQuery)
1:05:25 - Like & Unlike Tweet
1:17:38 - Update cach...
0:00 - Intro
1:06 - Bootstrap application
7:28 - Discord OAuth
10:41 - Create Tweet
35:35 - Seed database
37:40 - List Tweets
51:50 - Format dates with Day.js
54:00 - Cursor-based pagination
56:51 - Infinite scroll (useInfiniteQuery)
1:05:25 - Like & Unlike Tweet
1:17:38 - Update cach...
