-
Hey, and first of all thanks for the great work on the library! I'm new to SWR and I have been reading discussion & GH issues around this, and I'm still a bit unsure about how suspense and conditional fetching should work with the latest version (1.1.0-beta.9 at the time of writing this) so I was hoping to get some clarity around the issue 😄. I'm having an infinite rerender issue when using suspense with conditional fetching from version 1.0.0 onwards (including current beta). The SWR documentation on Suspense says that with conditional fetching,
Here is a Codesandbox where you can test the issue: https://codesandbox.io/s/cold-dust-4dvzl?file=/src/App.js (uncomment
Thanks! 🙇 |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
I recently upgraded to the 1.1.0 beta and I'm seeing the same thing. A large application that used to work is now stuck on the suspense fallback. I've tried setting the key to null, and the fetcher to null. Both yields the same issue for me. Unless we're supposed to solve conditional loading differently, this is clearly a bug. |
Beta Was this translation helpful? Give feedback.
-
This sounds like a regression indeed! |
Beta Was this translation helpful? Give feedback.
This sounds like a regression indeed!