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
I am rendering a list of components each using swr internally in suspense mode. Each component fetches data with different urls and the response data may result in structurally equal response data (which seems to be the key issue when fetching concurrently).
The initial load will be successful for all requests, but triggering a subsequent request for all components will cause requests resulting in same response data to remain pending and have the caller components remain in a suspended state. Furthermore, an infinite request loop has begun in the background calling the fetcher function every ~2 seconds.
This seems to only be an issue with version 0.5.x. Version 0.4.2 does not exhibit this behavior.
Bug report
Description / Observed Behavior
Thank you for a great library!
I am rendering a list of components each using swr internally in suspense mode. Each component fetches data with different urls and the response data may result in structurally equal response data (which seems to be the key issue when fetching concurrently).
The initial load will be successful for all requests, but triggering a subsequent request for all components will cause requests resulting in same response data to remain pending and have the caller components remain in a suspended state. Furthermore, an infinite request loop has begun in the background calling the fetcher function every ~2 seconds.
This seems to only be an issue with version 0.5.x. Version 0.4.2 does not exhibit this behavior.
Expected Behavior
To resolve data successfully
Repro Steps / Code Example
https://codesandbox.io/s/swr5-concurrent-suspense-bug-onut5?file=/src/App.tsx
Additional Context
SWR version 0.5.x
The text was updated successfully, but these errors were encountered: