Skip to content
Source
Docs
Explore
Skills
MCP servers
For agents
Search or jump to…
Sign in
Sign up
TanStack
/
query
Pull requests
TanStack
query
Public
Synced with GitHub
Popular #10
Fork
0
0
0
0
1
2
3
4
5
6
7
8
9
Code
Architecture
Issues
Pull requests
Community
Assets
Artifacts
CI
Agents
Settings
refactor(react-query): simplify the Suspense promise cache
#12682
Send to my agent
Merged
TkDodo
merged 1 commit into
query-v6
from
refs/pull/12682/head
·
merged by
TkDodo
last week
View on GitHub
Conversation
6
Commits
1
Files changed
3
Impact
Showing
3 changed files
with
25 additions
and
35 deletions
.
x
0 of 3 viewed, 3 left
Files
Hide whitespace
Unified
Split
5 additions and 0 deletions
+5
-0
.changeset/wild-rocks-smile.md
Added
Diff
Before/After
Preview
Viewed
.changeset/wild-rocks-smile.md
View file
@@ -0,0 +1,5 @@
1
+
---
2
+
"@tanstack/react-query": patch
3
+
---
4
+
5
+
Reduce the full React bundle size by simplifying the Suspense promise cache.
5 additions and 3 deletions
+5
-3
packages/react-query/src/__tests__/suspense.test.tsx
Modified
Diff
Before/After
Viewed
packages/react-query/src/__tests__/suspense.test.tsx
View file
Expand up
Show all 81 lines
@@ -82,7 +82,7 @@
82
82
await
firstPromise
83
83
})
84
84
85
-
it
(
'should keep the suspense promise stable after it settles'
,
async
() => {
85
+
it
(
'should create a new suspense promise when fetching again after it settles'
,
async
() => {
86
86
const
key =
createKey
()
87
87
const
options = queryClient.
defaultQueryOptions
({
88
88
queryKey
: key,
Expand up
Expand down
Show all 22 lines
@@ -111,10 +111,12 @@
111
111
observer,
112
112
errorResetBoundary,
113
113
observer.
getCurrentQuery
(),
114
-
false
,
115
114
)
116
115
117
-
expect
(secondPromise).
toBe
(firstPromise)
116
+
expect
(secondPromise).
not
.
toBe
(firstPromise)
117
+
118
+
await
vi.
advanceTimersByTimeAsync
(
10
)
119
+
await
secondPromise
Home
Search
Explore
Menu