Skip to content

Commit f91e059

Browse files
committed
chore(examples): show devtools in every React example
1 parent 541abc8 commit f91e059

13 files changed

Lines changed: 69 additions & 4 deletions

File tree

‎examples/react/compiler/package.json‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,9 @@
99
"test:types": "tsc"
1010
},
1111
"dependencies": {
12+
"@tanstack/react-devtools": "^0.10.5",
1213
"@tanstack/react-form": "^2.0.0-alpha.2",
14+
"@tanstack/react-form-devtools": "^1.0.0-alpha.2",
1315
"react": "19.2.8",
1416
"react-dom": "19.2.8"
1517
},

‎examples/react/compiler/src/index.tsx‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
import * as React from 'react'
22
import { createRoot } from 'react-dom/client'
33

4+
import { TanStackDevtools } from '@tanstack/react-devtools'
5+
import { formDevtoolsPlugin } from '@tanstack/react-form-devtools'
46
import { useForm } from '@tanstack/react-form'
57

68
import type { AnyFieldApi } from '@tanstack/react-form'
@@ -131,5 +133,10 @@ const rootElement = document.getElementById('root')!
131133
createRoot(rootElement).render(
132134
<React.StrictMode>
133135
<App />
136+
137+
<TanStackDevtools
138+
config={{ hideUntilHover: false }}
139+
plugins={[formDevtoolsPlugin()]}
140+
/>
134141
</React.StrictMode>,
135142
)

‎examples/react/large-form/src/index.tsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ createRoot(rootElement).render(
1313
<App />
1414

1515
<TanStackDevtools
16-
config={{ hideUntilHover: true }}
16+
config={{ hideUntilHover: false }}
1717
plugins={[formDevtoolsPlugin()]}
1818
/>
1919
</React.StrictMode>,

‎examples/react/multi-step-wizard/src/index.tsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ createRoot(rootElement).render(
1313
<App />
1414

1515
<TanStackDevtools
16-
config={{ hideUntilHover: true }}
16+
config={{ hideUntilHover: false }}
1717
plugins={[formDevtoolsPlugin()]}
1818
/>
1919
</React.StrictMode>,

‎examples/react/next-server-actions-zod/package.json‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,9 @@
88
"_test:types": "tsc"
99
},
1010
"dependencies": {
11+
"@tanstack/react-devtools": "^0.10.5",
1112
"@tanstack/react-form": "^2.0.0-alpha.2",
13+
"@tanstack/react-form-devtools": "^1.0.0-alpha.2",
1214
"@tanstack/react-form-nextjs": "^2.0.0-alpha.2",
1315
"next": "16.3.0",
1416
"react": "19.2.8",
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
'use client'
2+
3+
import { TanStackDevtools } from '@tanstack/react-devtools'
4+
import { formDevtoolsPlugin } from '@tanstack/react-form-devtools'
5+
6+
export function Devtools() {
7+
return (
8+
<TanStackDevtools
9+
plugins={[formDevtoolsPlugin()]}
10+
config={{
11+
hideUntilHover: false,
12+
}}
13+
/>
14+
)
15+
}
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
import { ClientComp } from './client-component'
2+
import { Devtools } from './devtools'
23

34
export default function Home() {
45
return (
56
<>
67
<ClientComp />
8+
<Devtools />
79
</>
810
)
911
}

‎examples/react/next-server-actions/package.json‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,9 @@
88
"_test:types": "tsc"
99
},
1010
"dependencies": {
11+
"@tanstack/react-devtools": "^0.10.5",
1112
"@tanstack/react-form": "^2.0.0-alpha.2",
13+
"@tanstack/react-form-devtools": "^1.0.0-alpha.2",
1214
"@tanstack/react-form-nextjs": "^2.0.0-alpha.2",
1315
"next": "16.3.0",
1416
"react": "19.2.8",
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
'use client'
2+
3+
import { TanStackDevtools } from '@tanstack/react-devtools'
4+
import { formDevtoolsPlugin } from '@tanstack/react-form-devtools'
5+
6+
export function Devtools() {
7+
return (
8+
<TanStackDevtools
9+
plugins={[formDevtoolsPlugin()]}
10+
config={{
11+
hideUntilHover: false,
12+
}}
13+
/>
14+
)
15+
}
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
import { ClientComp } from './client-component'
2+
import { Devtools } from './devtools'
23

34
export default function Home() {
45
return (
56
<>
67
<ClientComp />
8+
<Devtools />
79
</>
810
)
911
}

0 commit comments

Comments
 (0)