Hi, I like the solution. But if you use SWR with fetch, then with each revalidation the progress bar will appear. Is there a way to turn it off for SWR revalidate fetches?
Building 🏗 https://turnshift.app, Shift Scheduling for Slack Teams.
Also:
https://nextjsnews.com
https://github.com/vvo
https://dev.to/vvo
Before: JavaScript and support
@algolia
.
Good question; I am experiencing the same as you because of using SWR. For now, I am fine with it, but you're right; there should be a way to disable it.
Ways to do this:
use a custom fetcher that calls window. fetch() with some specific (non-standard) params allowing you to identify the calls to fetch are from SWR
in your fetch monkey patch, find the URL path, and if it's "/api" then you could not show the progress
If you try one of those or find other ways, let me know!
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Hi, I like the solution. But if you use SWR with fetch, then with each revalidation the progress bar will appear. Is there a way to turn it off for SWR revalidate fetches?
Good question; I am experiencing the same as you because of using SWR. For now, I am fine with it, but you're right; there should be a way to disable it.
Ways to do this:
If you try one of those or find other ways, let me know!