Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
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
8 changes: 7 additions & 1 deletion .changeset/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,13 @@
"access": "public",
"baseBranch": "main",
"updateInternalDependencies": "patch",
"fixed": [],
"fixed": [
[
"@tanstack/form-devtools",
"@tanstack/react-form-devtools",
"@tanstack/solid-form-devtools"
]
],
"linked": [],
"ignore": []
}
7 changes: 7 additions & 0 deletions .changeset/petite-ducks-cough.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
'@tanstack/react-form-devtools': minor
'@tanstack/solid-form-devtools': minor
'@tanstack/form-devtools': minor
---

Migrated to devtools utils, adds support for solid devtools. Renamed plugin to reflect tanstack plugin schema (FormDevtoolsPlugin to formDevtoolsPlugin)
1 change: 1 addition & 0 deletions codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@ coverage:
ignore:
- 'packages/form-devtools'
- 'packages/react-form-devtools'
- 'packages/solid-form-devtools'
6 changes: 3 additions & 3 deletions docs/framework/react/guides/devtools.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,19 +30,19 @@ createRoot(document.getElementById('root')!).render(
)
```

Import the `FormDevtoolsPlugin` from **TanStack Form** and provide it to the `TanStackDevtools` component.
Import the `formDevtoolsPlugin` from **TanStack Form** and provide it to the `TanStackDevtools` component.

```tsx
import { TanStackDevtools } from '@tanstack/react-devtools'
import { FormDevtoolsPlugin } from '@tanstack/react-form-devtools'
import { formDevtoolsPlugin } from '@tanstack/react-form-devtools'

import App from './App'

createRoot(document.getElementById('root')!).render(
<StrictMode>
<App />

<TanStackDevtools plugins={[FormDevtoolsPlugin()]} />
<TanStackDevtools plugins={[formDevtoolsPlugin()]} />
</StrictMode>,
)
```
Expand Down
60 changes: 60 additions & 0 deletions docs/framework/solid/guides/devtools.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
---
id: devtools
title: Devtools
---

TanStack Form comes with a ready to go suit of devtools.

## Setup

Install the [TanStack Devtools](https://tanstack.com/devtools/latest/docs/quick-start) library and the [TanStack Form plugin](http://npmjs.com/package/@tanstack/solid-form-devtools), from the framework adapter that your working in (in this case `@tanstack/solid-devtools`, and `@tanstack/solid-form-devtools`).

```bash
npm i @tanstack/solid-devtools
npm i @tanstack/solid-form-devtools
```

Next in the root of your application import the `TanStackDevtools`.

```tsx
import { TanStackDevtools } from '@tanstack/solid-devtools'

import App from './App'

render(
() => (
<>
<App />

<TanStackDevtools />
</>
),
root!,
)
```

Import the `formDevtoolsPlugin` from **TanStack Form** and provide it to the `TanStackDevtools` component.

```tsx
import { TanStackDevtools } from '@tanstack/solid-devtools'
import { formDevtoolsPlugin } from '@tanstack/solid-form-devtools'

import App from './app'

const root = document.getElementById('root')

render(
() => (
<>
<App />

<TanStackDevtools plugins={[formDevtoolsPlugin()]} />
</>
),
root!,
)
```

Finally add any additional configuration you desire to the `TanStackDevtools` component, more information can be found under the [TanStack Devtools Configuration](https://tanstack.com/devtools/) section.

A complete working example can be found in our [examples section](https://tanstack.com/form/latest/docs/framework/solid/examples/devtools).
4 changes: 2 additions & 2 deletions examples/react/array/src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import * as React from 'react'
import { createRoot } from 'react-dom/client'

import { TanStackDevtools } from '@tanstack/react-devtools'
import { FormDevtoolsPlugin } from '@tanstack/react-form-devtools'
import { formDevtoolsPlugin } from '@tanstack/react-form-devtools'
import { useForm } from '@tanstack/react-form'

interface Person {
Expand Down Expand Up @@ -85,7 +85,7 @@ createRoot(rootElement).render(

<TanStackDevtools
config={{ hideUntilHover: true }}
plugins={[FormDevtoolsPlugin()]}
plugins={[formDevtoolsPlugin()]}
/>
</React.StrictMode>,
)
4 changes: 2 additions & 2 deletions examples/react/devtools/src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@ import { StrictMode } from 'react'
import { createRoot } from 'react-dom/client'

import { TanStackDevtools } from '@tanstack/react-devtools'
import { FormDevtoolsPlugin } from '@tanstack/react-form-devtools'
import { formDevtoolsPlugin } from '@tanstack/react-form-devtools'

import App from './App'

createRoot(document.getElementById('root')!).render(
<StrictMode>
<App />

<TanStackDevtools plugins={[FormDevtoolsPlugin()]} />
<TanStackDevtools plugins={[formDevtoolsPlugin()]} />
</StrictMode>,
)
4 changes: 2 additions & 2 deletions examples/react/dynamic/src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { createRoot } from 'react-dom/client'
import { z } from 'zod'

import { TanStackDevtools } from '@tanstack/react-devtools'
import { FormDevtoolsPlugin } from '@tanstack/react-form-devtools'
import { formDevtoolsPlugin } from '@tanstack/react-form-devtools'
import { revalidateLogic, useForm } from '@tanstack/react-form'

import type { AnyFieldApi } from '@tanstack/react-form'
Expand Down Expand Up @@ -125,7 +125,7 @@ createRoot(rootElement).render(

<TanStackDevtools
config={{ hideUntilHover: true }}
plugins={[FormDevtoolsPlugin()]}
plugins={[formDevtoolsPlugin()]}
/>
</React.StrictMode>,
)
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { createRoot } from 'react-dom/client'

import { useForm } from '@tanstack/react-form'
import { TanStackDevtools } from '@tanstack/react-devtools'
import { FormDevtoolsPlugin } from '@tanstack/react-form-devtools'
import { formDevtoolsPlugin } from '@tanstack/react-form-devtools'

async function sleep(ms: number) {
return new Promise((resolve) => {
Expand Down Expand Up @@ -141,7 +141,7 @@ createRoot(rootElement).render(

<TanStackDevtools
config={{ hideUntilHover: true }}
plugins={[FormDevtoolsPlugin()]}
plugins={[formDevtoolsPlugin()]}
/>
</>,
)
4 changes: 2 additions & 2 deletions examples/react/large-form/src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import * as React from 'react'
import { createRoot } from 'react-dom/client'

import { TanStackDevtools } from '@tanstack/react-devtools'
import { FormDevtoolsPlugin } from '@tanstack/react-form-devtools'
import { formDevtoolsPlugin } from '@tanstack/react-form-devtools'

import App from './App.tsx'

Expand All @@ -14,7 +14,7 @@ createRoot(rootElement).render(

<TanStackDevtools
config={{ hideUntilHover: true }}
plugins={[FormDevtoolsPlugin()]}
plugins={[formDevtoolsPlugin()]}
/>
</React.StrictMode>,
)
4 changes: 2 additions & 2 deletions examples/react/query-integration/src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import * as React from 'react'
import { createRoot } from 'react-dom/client'

import { TanStackDevtools } from '@tanstack/react-devtools'
import { FormDevtoolsPlugin } from '@tanstack/react-form-devtools'
import { formDevtoolsPlugin } from '@tanstack/react-form-devtools'
import { useForm } from '@tanstack/react-form'
import {
QueryClient,
Expand Down Expand Up @@ -174,7 +174,7 @@ createRoot(rootElement).render(

<TanStackDevtools
config={{ hideUntilHover: true }}
plugins={[FormDevtoolsPlugin()]}
plugins={[formDevtoolsPlugin()]}
/>
</React.StrictMode>,
)
4 changes: 2 additions & 2 deletions examples/react/simple/src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import * as React from 'react'
import { createRoot } from 'react-dom/client'

import { TanStackDevtools } from '@tanstack/react-devtools'
import { FormDevtoolsPlugin } from '@tanstack/react-form-devtools'
import { formDevtoolsPlugin } from '@tanstack/react-form-devtools'
import { useForm } from '@tanstack/react-form'

import type { AnyFieldApi } from '@tanstack/react-form'
Expand Down Expand Up @@ -128,7 +128,7 @@ createRoot(rootElement).render(

<TanStackDevtools
config={{ hideUntilHover: true }}
plugins={[FormDevtoolsPlugin()]}
plugins={[formDevtoolsPlugin()]}
/>
</React.StrictMode>,
)
4 changes: 2 additions & 2 deletions examples/react/standard-schema/src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import * as v from 'valibot'
import { z } from 'zod'

import { TanStackDevtools } from '@tanstack/react-devtools'
import { FormDevtoolsPlugin } from '@tanstack/react-form-devtools'
import { formDevtoolsPlugin } from '@tanstack/react-form-devtools'
import { useForm } from '@tanstack/react-form'

import type { AnyFieldApi } from '@tanstack/react-form'
Expand Down Expand Up @@ -155,7 +155,7 @@ createRoot(rootElement).render(

<TanStackDevtools
config={{ hideUntilHover: true }}
plugins={[FormDevtoolsPlugin()]}
plugins={[formDevtoolsPlugin()]}
/>
</React.StrictMode>,
)
4 changes: 2 additions & 2 deletions examples/react/tanstack-start/src/routes/__root.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { HeadContent, Scripts, createRootRoute } from '@tanstack/react-router'

import { TanStackDevtools } from '@tanstack/react-devtools'
import { FormDevtoolsPlugin } from '@tanstack/react-form-devtools'
import { formDevtoolsPlugin } from '@tanstack/react-form-devtools'

export const Route = createRootRoute({
head: () => ({
Expand Down Expand Up @@ -30,7 +30,7 @@ function RootDocument({ children }: { children: React.ReactNode }) {
<body>
{children}
<Scripts />
<TanStackDevtools plugins={[FormDevtoolsPlugin()]} />
<TanStackDevtools plugins={[formDevtoolsPlugin()]} />
</body>
</html>
)
Expand Down
4 changes: 2 additions & 2 deletions examples/react/ui-libraries/src/index.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from 'react'

import { TanStackDevtools } from '@tanstack/react-devtools'
import { FormDevtoolsPlugin } from '@tanstack/react-form-devtools'
import { formDevtoolsPlugin } from '@tanstack/react-form-devtools'

import { createRoot } from 'react-dom/client'
import { createTheme } from '@mui/material/styles'
Expand Down Expand Up @@ -41,7 +41,7 @@ createRoot(rootElement).render(

<TanStackDevtools
config={{ hideUntilHover: true }}
plugins={[FormDevtoolsPlugin()]}
plugins={[formDevtoolsPlugin()]}
/>
</React.StrictMode>,
)
24 changes: 24 additions & 0 deletions examples/solid/devtools/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*

node_modules
dist
dist-ssr
*.local

# Editor directories and files
.vscode/*
!.vscode/extensions.json
.idea
.DS_Store
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?
28 changes: 28 additions & 0 deletions examples/solid/devtools/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
## Usage

```bash
$ npm install # or pnpm install or yarn install
```

### Learn more on the [Solid Website](https://solidjs.com) and come chat with us on our [Discord](https://discord.com/invite/solidjs)

## Available Scripts

In the project directory, you can run:

### `npm run dev`

Runs the app in the development mode.<br>
Open [http://localhost:5173](http://localhost:5173) to view it in the browser.

### `npm run build`

Builds the app for production to the `dist` folder.<br>
It correctly bundles Solid in production mode and optimizes the build for the best performance.

The build is minified and the filenames include the hashes.<br>
Your app is ready to be deployed!

## Deployment

Learn more about deploying your application with the [documentations](https://vitejs.dev/guide/static-deploy.html)
12 changes: 12 additions & 0 deletions examples/solid/devtools/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>TanStack Form Solid Devtools Example App</title>
</head>
<body>
<div id="root"></div>
<script type="module" src="/src/index.tsx"></script>
</body>
</html>
22 changes: 22 additions & 0 deletions examples/solid/devtools/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"name": "@tanstack/form-example-solid-devtools",
"private": true,
"type": "module",
"scripts": {
"dev": "vite",
"build": "tsc && vite build",
"test:types": "tsc",
"preview": "vite preview"
},
"dependencies": {
"@tanstack/solid-devtools": "^0.7.0",
"@tanstack/solid-form": "^1.23.5",
"@tanstack/solid-form-devtools": "workspace:*",
"solid-js": "^1.9.9"
},
"devDependencies": {
"typescript": "5.8.2",
"vite": "^7.1.6",
"vite-plugin-solid": "^2.11.8"
}
}
Loading
Loading