-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(react-query): ensure we have a gcTime of at least 1 second when using suspense #7860
Conversation
…sing suspense Because React continues to render components that have already thrown to error boundaries, a small gcTime would lead to infinite fetches because if the cache entry is already removed, the next render will treat the extra render as a new suspending query.
☁️ Nx Cloud ReportCI is running/has finished running commands for commit 169a48d. As they complete they will appear below. Click to see the status, the terminal output, and the build insights. 📂 See all runs for this CI Pipeline Execution ✅ Successfully ran 2 targetsSent with 💌 from NxCloud. |
commit: @tanstack/angular-query-devtools-experimental
@tanstack/angular-query-experimental
@tanstack/eslint-plugin-query
@tanstack/query-async-storage-persister
@tanstack/query-broadcast-client-experimental
@tanstack/query-core
@tanstack/query-devtools
@tanstack/query-persist-client-core
@tanstack/query-sync-storage-persister
@tanstack/react-query
@tanstack/react-query-devtools
@tanstack/react-query-next-experimental
@tanstack/react-query-persist-client
@tanstack/solid-query
@tanstack/solid-query-devtools
@tanstack/solid-query-persist-client
@tanstack/svelte-query
@tanstack/svelte-query-devtools
@tanstack/svelte-query-persist-client
@tanstack/vue-query
@tanstack/vue-query-devtools
More templates
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #7860 +/- ##
=========================================
+ Coverage 0 85.88% +85.88%
=========================================
Files 0 24 +24
Lines 0 326 +326
Branches 0 85 +85
=========================================
+ Hits 0 280 +280
- Misses 0 39 +39
- Partials 0 7 +7
|
Because React continues to render components that have already thrown to error boundaries, a small gcTime would lead to infinite fetches because if the cache entry is already removed, the next render will treat the extra render as a new suspending query.
fixes #7853