This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
Feature Request: Alternative to isLoading for useSWRInfinite #2399
Labels
area: pagination
Pagination related issues
Description / Observed Behavior
isLoading
only applies to the initial / first request.I have a project with many infinite scrolls and this is the line which is repeated (taken from your infinite loading example):
isLoadingMore
in this case is true while the next page data is being loaded and false otherwise:I was wondering if it would be possible to expose a property like
isLoadingMore
foruseSWRInfinite
so we avoid repeating this block for every infinite scroll in the app. Or maybe makeisLoading
to be true for all loading useSWRInfinite requests? (i.e. regardless of whether it's initial request or subsequent)Repro Steps / Code Example
https://swr.vercel.app/examples/infinite-loading
Additional Context
SWR: v2.0.3
The text was updated successfully, but these errors were encountered: