-
-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Idea: refetching status #3
Comments
hmm i'm not sure if this would be justified as this would be identical behavior to not using the package and just passing the server data as a promise / using defer without clientLoader, could you give me an example of the use-case? |
What if you are handling like a list of items (books?) the first time you hit the page serverLoader is going to fetch the data. Let's add in the backend 10+ items The second time you are going to the app the clientLoader is serving the data from storage and behind the scenes the a fetch is happening (swr mode). If the fetch is slow (or your network is bad) then the it takes some time to finish and finally the app will display the new 10+ items but the UI effect will be a kind of "appearing in a blink". If the lib exposes a "isBackgroundFetchingStatus" then in the UI you could display a banner (or whatever) warning the user that some new data might appear in the coming seconds. Amazing work btw! |
@FKSI I see, okay, I think I've figured out how to add it |
In
swr
mode expose a "fetching state" to let the app display a skeleton for example.The text was updated successfully, but these errors were encountered: