Skip to content

Commit e61bfc1

Browse files
authored
feat: tanstack devtools + add router devtools (#615)
1 parent 2000791 commit e61bfc1

File tree

4 files changed

+272
-60
lines changed

4 files changed

+272
-60
lines changed

app/routes/__root.tsx

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
1+
import { TanStackDevtools } from '@tanstack/react-devtools';
12
import { QueryClient } from '@tanstack/react-query';
2-
import { ReactQueryDevtools } from '@tanstack/react-query-devtools';
3+
import { ReactQueryDevtoolsPanel } from '@tanstack/react-query-devtools';
34
import {
45
createRootRouteWithContext,
56
HeadContent,
67
Outlet,
78
Scripts,
89
} from '@tanstack/react-router';
10+
import { TanStackRouterDevtoolsPanel } from '@tanstack/react-router-devtools';
911
import { createServerFn } from '@tanstack/react-start';
1012
import { type ReactNode } from 'react';
1113
import { useTranslation } from 'react-i18next';
@@ -110,7 +112,15 @@ function RootComponent() {
110112
<RootDocument>
111113
<Providers>
112114
<Outlet />
113-
<ReactQueryDevtools initialIsOpen={false} />
115+
<TanStackDevtools
116+
plugins={[
117+
{ name: 'Tanstack Query', render: <ReactQueryDevtoolsPanel /> },
118+
{
119+
name: 'Tanstack Router',
120+
render: <TanStackRouterDevtoolsPanel />,
121+
},
122+
]}
123+
/>
114124
</Providers>
115125
</RootDocument>
116126
);

package.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,10 @@
5757
"@t3-oss/env-core": "0.13.4",
5858
"@tanstack/react-query": "5.81.5",
5959
"@tanstack/react-query-devtools": "5.81.5",
60+
"@tanstack/devtools-vite": "0.3.3",
61+
"@tanstack/react-devtools": "0.7.0",
6062
"@tanstack/react-router": "1.131.50",
63+
"@tanstack/react-router-devtools": "1.131.50",
6164
"@tanstack/react-start": "1.131.50",
6265
"@tanstack/zod-adapter": "1.131.50",
6366
"@uidotdev/usehooks": "2.4.1",

0 commit comments

Comments
 (0)