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
Click on "Toogle fetch component". This will mount the component using swr and throw an error (as expected). Then, double click on the button to remount the component. In Devtools network log I can see network calls are missing when component is re-mounted.
With suspense: false the scenario causes data re-validation on every remount (in Network log I can see a new network call when component is re-mounted.
Additional Context
SWR version: 0.3.0
The text was updated successfully, but these errors were encountered:
Bug report
Description / Observed Behavior
Data is not re-validated on a component mount if fetcher throws an error and
suspense
config is on.Expected Behavior
Re-validating behaviour should be the same with
suspense: true
orsuspense: false
.Repro Steps / Code Example
https://codesandbox.io/s/vigilant-worker-dr5so?file=/src/App.js
Click on "Toogle fetch component". This will mount the component using swr and throw an error (as expected). Then, double click on the button to remount the component. In Devtools network log I can see network calls are missing when component is re-mounted.
With
suspense: false
the scenario causes data re-validation on every remount (in Network log I can see a new network call when component is re-mounted.Additional Context
SWR version: 0.3.0
The text was updated successfully, but these errors were encountered: