You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've noticed that useSWRInfinite is behaving weird in Next.js when using the router query parameters to change the URI key. The issue is only visible after going back or forward in the browser.
Uh oh!
There was an error while loading. Please reload this page.
Bug report
Description / Observed Behavior
I've noticed that
useSWRInfinite
is behaving weird in Next.js when using the router query parameters to change the URI key. The issue is only visible after going back or forward in the browser.Repro Steps / Code Example
I have made a copy of the official infinite example here:
Note: I'm console logging the
size
to make it easier to see the change in the following cases.Case 1 (working as expected):
Result:
useSWRInfinite
will remember the correctsize: 3
of the first page.Case 2 (not working as expected):
Result:
useSWRInfinite
will remember the correctsize: 3
of the first page for a second before resetting it to 1.The text was updated successfully, but these errors were encountered: