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
When provide SWRConfig fallback key with unstable_serialize in SSR Mode, and use useSWR with keepPreviousData: true and revalidateIfStale: false; when change key, new data feched and everythings is okay, but when back to fallback key that provided before with SWRConfig, useSWR not back to fallback data. This happens only when keepPreviousData is true.
Expected Behavior
When change key must be return data if there otherwise fetch new data or revlidate data with key.
Bug report
Description / Observed Behavior
When provide SWRConfig fallback key with unstable_serialize in SSR Mode, and use
useSWR
withkeepPreviousData: true
andrevalidateIfStale: false
; when change key, new data feched and everythings is okay, but when back to fallback key that provided before withSWRConfig
,useSWR
not back tofallback data
. This happens only whenkeepPreviousData
istrue
.Expected Behavior
When change key must be return data if there otherwise fetch new data or revlidate data with key.
Repro Steps / Code Example
Fixed temporary when mutate for first time:
Additional Context
SWR v2.2.5
The text was updated successfully, but these errors were encountered: