-
-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Suspense loader not retriggered if query is invalidated #1065
Copy link
Copy link
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Describe the bug
If a query is invalidated because data needs to be refetched, the React Suspense loading state is not also re-triggered.
Expected Behavior
I would expect the fallback to retrigger when:
- The query is invalidated. A loader is appropriate because the data is invalid, and refetching must occur.
- The refetch function is called
I would not expect the fallback to retrigger if:
- The query is "refetched" by setting the refetch prop, as polling may be wanted in the background without disrupting the current screen.
To Reproduce
See codepen here:
https://codesandbox.io/s/charming-joliot-nm1pt?file=/src/index.js
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working