npm / @tanstack/react-query-devtools
@tanstack/react-query-devtools
What changed in @tanstack/react-query-devtools 4 to 5, from its official release notes, upgrade guides and advisories. Sources checked 2026-11-23.
2 breaking1 new APIs and options1 performance1 behavior and defaults2 tooling4 fixes and other
See which of these apply to your code, ranked, in your agent:
npx @unstale/cli init@tanstack/react-query-devtools 510 changes
Breaking changes 1
Rename the query option cacheTime to gcTime in defaultOptions.queries.
New APIs and options 1
Allows passing a theme via a prop in the devtools component.
Performance 1
The devtools instance is created only once instead of on every render.
Behavior and default changes 1
Inline panels fill their container's height; when the container has no set height, they default to 500px.
Tooling 2
Declare
@types/reactas an optional peer dependency.React types used by React Query Devtools are now declared as a peer dependency compatible with React 18 and 19.
Fixes and other changes 4
The devtools always render left-to-right, regardless of page direction or browser language.
Published devtools source and type declarations now declare their dependencies for compatibility with strict package managers, while runtime dependencies remain bundled.
Changed the onClose callback type from () => unknown to () => void.
Resolved an issue involving the excluded build directory.
@tanstack/react-query-devtools 41 changes
Breaking changes 1
Devtools are installed as a separate package and imported from @tanstack/react-query-devtools instead of react-query/devtools.