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
Great suggestion. I think it may be of some use in the core, indeed. I'll think about adding it there in the upcoming release.
In the meantime I'll just say that it's fairly straightforward to implement in userland (even in the form of a reusable utility). Here's a simple implementation. I may have missed something there (e.g., data will be there even if error shows up which I'm not sure is the right call), but it seems quite stable to me.
There are not enough "keep previous data" feature - return the previous key's data until the new data has been loaded.
This feature is well explained in swr: https://swr.vercel.app/docs/advanced/understanding#return-previous-data-for-better-ux
There is an example on
@nanostores /query
: https://codesandbox.io/p/sandbox/nanostories-query-react-paging-rick-morty-q6ctwmIt shows how the content "jumps" when the user navigates to the next page (when the cache is empty).
The text was updated successfully, but these errors were encountered: