Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
16 commits
Select commit Hold shift + click to select a range
6859b04
feat(react-query): add 'QueryStrictMode' to report missing and unused…
DogPawHat Oct 17, 2026
e86a0fd
chore(changeset): add a minor changeset for 'QueryStrictMode'
DogPawHat Oct 17, 2026
f0c4609
feat(react-query): report missing prefetches of non-suspense queries …
DogPawHat Oct 17, 2026
c392d54
test(react-query): add failing tests for unused prefetches that 'Quer…
DogPawHat Oct 19, 2026
a6579d9
test(react-query): rewrite 'QueryStrictMode' tests for a single 'hand…
DogPawHat Oct 19, 2026
04d864f
feat(react-query): replace 'logger' and 'throwOn...' with a single 'h…
DogPawHat Oct 19, 2026
7e03344
fix(react-query): track prefetches from the first render of 'QueryStr…
DogPawHat Oct 19, 2026
ba1f559
docs(react-query): document what a throwing 'QueryStrictModeHandler' …
DogPawHat Oct 19, 2026
8f74628
test(react-query): remove type tests for 'QueryStrictMode' props that…
DogPawHat Oct 19, 2026
0963b42
test(react-query): make 'QueryStrictMode' tests cover StrictMode remo…
DogPawHat Oct 19, 2026
062c8f1
test(react-query): add failing tests for sibling 'QueryStrictMode's t…
DogPawHat Oct 19, 2026
8cd6097
fix(react-query): share used and checked prefetches between 'QueryStr…
DogPawHat Oct 19, 2026
e399015
test(react-query): remove redundant 'QueryStrictMode' tests
DogPawHat Oct 19, 2026
b4a85c1
perf(react-query): keep 'QueryStrictMode' checks out of production bu…
DogPawHat Oct 19, 2026
70383e3
feat(react-query): throw a 'QueryStrictModeError' from the default 'Q…
DogPawHat Oct 20, 2026
161d880
docs(react-query): remove blank line before '@example' in 'QueryStric…
DogPawHat Oct 20, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/query-strict-mode.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@tanstack/react-query': minor
---

feat(react-query): add `QueryStrictMode`, which reports missing prefetches (a query hook starting the initial fetch of its query; `event.suspense` tells suspense hooks apart) and unused prefetches (a prefetched query nobody reads within `unusedPrefetchTimeout`) in development. Problems are passed to `handler`, which throws a `QueryStrictModeError` to an error boundary by default; pass a `handler` that returns, for example one that logs `event.message`, to report problems without throwing. In production it only renders `children`.
Loading
Loading