revalidateOnMount not working on react-native
See original GitHub issueBug report
Description / Observed Behavior
I added revalidateOnMount
option to useSWR, but it doesn’t seem to revalidate, no requests get fired after I open a screen for the second time.
Expected Behavior
It should revalidate all requests when re-opening screen
Repro Steps / Code Example
I tried to prove the bug, but here I have the complete opposite behaviour. Can’t turn the revalidation off 😕
Issue Analytics
- State:
- Created 3 years ago
- Comments:9 (4 by maintainers)
Top Results From Across the Web
API - SWR
SWR is a React Hooks library for data fetching. SWR first returns the data from cache (stale), then sends the fetch request (revalidate),...
Read more >Can I fetch data only once when using swr? - Stack Overflow
With swr, I can get data immediately when I'm not the first time access the page. But still, it calls the api to...
Read more >[Solved]-Disable prefetch on SWR-Reactjs - appsloveworld.com
React · How to disable image fade in effect in React Native? ... Problem when creating 3 Column Card Grid using Bulma &...
Read more >@pioul/swr - npm
React Hooks library for remote data fetching. Latest version: 0.2.3-1, last published: 3 years ago. Start using @pioul/swr in your project ...
Read more >React Native (@reactnative) / Twitter
0.71.0-rc.2 of #reactnative⚛️ release is out! We did RC1 yesterday but there was a problem iOS side, so we tackled it quickly and...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Just to cross post this here, I have found the issue that’s causing this and submitted a PR to fix it. It’s easy to fix this yourself using patch-package.
Close this as it’s more like a react native runtime issue