Comments (2)
I cannot seem to trigger this behavior. When the zeroth page changes, all middle pages remain the same, which produces skips and duplicate keys in the list.
I think this behavior is for cursor-based API, but your example is a page-based API.
from swr.
You're right, I misread the comment from shuding. He was explicitly talking about cursor-based APIs.
However I'm now more confused, since a cursor sidesteps the content shift problem entirely. The revalidation waterfall he talks about is not necessary in that case? Can this waterfall even happen, like is it a feature that exists in code?
Sorry, I'll be happy to close this issue and open a discussion about this, because I was clearly mistaken.
from swr.
Related Issues (20)
- Unexpected `revalidateIfStale = false` initial load behavior on key change HOT 1
- useSWR('key', fetcher) calls fetcher non-deterministically even when `key` is in the fallback
- Can I call both of onSuccess function in trigger options and useSWRMutation options?
- Fetcher isn't run again when error boundary resets using Suspense. HOT 1
- SWR should assert the data not be undefined if `isLoading` is false and `error` is null HOT 1
- Clarification Needed on Handling data for Optimistic Updates in useSWRMutation
- swr repeated render problem
- "isLoading" always true after clear the cache HOT 1
- Missing export of type `SWRInfiniteMutatorOptions` starting from 2.2.5
- Cache flaw: mutate of cache keys is ignored when no consuming hook is mounted
- Bound Mutate does not update state but useSWRMutation does HOT 2
- TYPESCRIPT: Axios fetcher(METHOD POST) + NextJs SSR = URL Malformed HOT 1
- Conditional rendering does not have correct type
- Bound/global mutate functions do not mutate remote data HOT 2
- bug: type error on updating cache with bound mutate HOT 1
- RSC Example doesn't work HOT 6
- onDiscarded is never called
- TypeError: Cannot read properties of null (reading 'useContext')
- useSWRInfinite with revalidateAll: true revalidates all pages when loading next page
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from swr.