diff --git a/docs/framework/react/reference/functions/useform.md b/docs/framework/react/reference/functions/useform.md
index f3aa414c5..dd5083e49 100644
--- a/docs/framework/react/reference/functions/useform.md
+++ b/docs/framework/react/reference/functions/useform.md
@@ -29,4 +29,4 @@ This API encapsulates all the necessary functionalities related to the form. It
## Defined in
-[useForm.tsx:54](https://github.com/TanStack/form/blob/main/packages/react-form/src/useForm.tsx#L54)
+[useForm.tsx:67](https://github.com/TanStack/form/blob/main/packages/react-form/src/useForm.tsx#L67)
diff --git a/docs/reference/classes/formapi.md b/docs/reference/classes/formapi.md
index 3a6739ce4..859d86b11 100644
--- a/docs/reference/classes/formapi.md
+++ b/docs/reference/classes/formapi.md
@@ -79,7 +79,7 @@ The current state of the form.
**Note:**
Do not use `state` directly, as it is not reactive.
-Please use form.useStore() utility to subscribe to state
+Please use useStore(form.store) utility to subscribe to state
#### Defined in
diff --git a/examples/lit/simple/package.json b/examples/lit/simple/package.json
index 8650a8ae1..1cba20f4a 100644
--- a/examples/lit/simple/package.json
+++ b/examples/lit/simple/package.json
@@ -13,7 +13,7 @@
"lit": "^3.2.1"
},
"devDependencies": {
- "vite": "^5.4.10"
+ "vite": "^5.4.11"
},
"browserslist": {
"production": [
diff --git a/examples/lit/ui-libraries/package.json b/examples/lit/ui-libraries/package.json
index 4b0994782..1048cdd93 100644
--- a/examples/lit/ui-libraries/package.json
+++ b/examples/lit/ui-libraries/package.json
@@ -14,7 +14,7 @@
"lit": "^3.2.1"
},
"devDependencies": {
- "vite": "^5.4.10"
+ "vite": "^5.4.11"
},
"browserslist": {
"production": [
diff --git a/examples/react/array/package.json b/examples/react/array/package.json
index 995473a8b..0d7ec8c0b 100644
--- a/examples/react/array/package.json
+++ b/examples/react/array/package.json
@@ -17,7 +17,7 @@
"@types/react": "^18.3.3",
"@types/react-dom": "^18.3.0",
"@vitejs/plugin-react": "^4.3.3",
- "vite": "^5.4.10"
+ "vite": "^5.4.11"
},
"browserslist": {
"production": [
diff --git a/examples/react/compiler/.eslintrc.cjs b/examples/react/compiler/.eslintrc.cjs
new file mode 100644
index 000000000..52b3c0f7a
--- /dev/null
+++ b/examples/react/compiler/.eslintrc.cjs
@@ -0,0 +1,16 @@
+// @ts-check
+const reactCompiler = require('eslint-plugin-react-compiler')
+
+/** @type {import('eslint').Linter.Config} */
+const config = {
+ plugins: {
+ 'react-compiler': reactCompiler,
+ },
+ extends: ['plugin:react/recommended', 'plugin:react-hooks/recommended'],
+ rules: {
+ 'react/no-children-prop': 'off',
+ 'react-compiler/react-compiler': 'error',
+ },
+}
+
+module.exports = config
diff --git a/examples/react/compiler/.gitignore b/examples/react/compiler/.gitignore
new file mode 100644
index 000000000..4673b022e
--- /dev/null
+++ b/examples/react/compiler/.gitignore
@@ -0,0 +1,27 @@
+# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
+
+# dependencies
+/node_modules
+/.pnp
+.pnp.js
+
+# testing
+/coverage
+
+# production
+/build
+
+pnpm-lock.yaml
+yarn.lock
+package-lock.json
+
+# misc
+.DS_Store
+.env.local
+.env.development.local
+.env.test.local
+.env.production.local
+
+npm-debug.log*
+yarn-debug.log*
+yarn-error.log*
diff --git a/examples/react/compiler/README.md b/examples/react/compiler/README.md
new file mode 100644
index 000000000..1cf889265
--- /dev/null
+++ b/examples/react/compiler/README.md
@@ -0,0 +1,6 @@
+# Example
+
+To run this example:
+
+- `npm install`
+- `npm run dev`
diff --git a/examples/react/compiler/index.html b/examples/react/compiler/index.html
new file mode 100644
index 000000000..5d0e76cd4
--- /dev/null
+++ b/examples/react/compiler/index.html
@@ -0,0 +1,16 @@
+
+
+
+
+
+
+
+
+
TanStack Form React Simple Example App
+
+
+
You need to enable JavaScript to run this app.
+
+
+
+
diff --git a/examples/react/compiler/package.json b/examples/react/compiler/package.json
new file mode 100644
index 000000000..b0758091b
--- /dev/null
+++ b/examples/react/compiler/package.json
@@ -0,0 +1,40 @@
+{
+ "name": "@tanstack/form-example-react-compiler",
+ "private": true,
+ "type": "module",
+ "scripts": {
+ "dev": "vite --port=3001",
+ "build": "vite build",
+ "preview": "vite preview",
+ "_test:types": "tsc"
+ },
+ "dependencies": {
+ "@tanstack/react-form": "^0.38.0",
+ "react": "^19.0.0-rc.1",
+ "react-dom": "^19.0.0-rc.1"
+ },
+ "devDependencies": {
+ "@types/react": "npm:types-react@rc",
+ "@types/react-dom": "npm:types-react-dom@rc",
+ "@vitejs/plugin-react": "^4.3.3",
+ "babel-plugin-react-compiler": "^19.0.0-beta-0dec889-20241115",
+ "eslint-plugin-react-compiler": "^19.0.0-beta-0dec889-20241115",
+ "vite": "^5.4.11"
+ },
+ "overrides": {
+ "@types/react": "npm:types-react@rc",
+ "@types/react-dom": "npm:types-react-dom@rc"
+ },
+ "browserslist": {
+ "production": [
+ ">0.2%",
+ "not dead",
+ "not op_mini all"
+ ],
+ "development": [
+ "last 1 chrome version",
+ "last 1 firefox version",
+ "last 1 safari version"
+ ]
+ }
+}
diff --git a/examples/react/compiler/public/emblem-light.svg b/examples/react/compiler/public/emblem-light.svg
new file mode 100644
index 000000000..a58e69ad5
--- /dev/null
+++ b/examples/react/compiler/public/emblem-light.svg
@@ -0,0 +1,13 @@
+
+
+
+ emblem-light
+ Created with Sketch.
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/examples/react/compiler/src/index.tsx b/examples/react/compiler/src/index.tsx
new file mode 100644
index 000000000..67cfca1d3
--- /dev/null
+++ b/examples/react/compiler/src/index.tsx
@@ -0,0 +1,118 @@
+import { useForm } from '@tanstack/react-form'
+import * as React from 'react'
+import { createRoot } from 'react-dom/client'
+import type { FieldApi } from '@tanstack/react-form'
+
+function FieldInfo({ field }: { field: FieldApi
}) {
+ return (
+ <>
+ {field.state.meta.isTouched && field.state.meta.errors.length ? (
+ {field.state.meta.errors.join(',')}
+ ) : null}
+ {field.state.meta.isValidating ? 'Validating...' : null}
+ >
+ )
+}
+
+export default function App() {
+ const form = useForm({
+ defaultValues: {
+ firstName: '',
+ lastName: '',
+ },
+ onSubmit: async ({ value }) => {
+ // Do something with form data
+ console.log(value)
+ },
+ })
+
+ return (
+
+
Simple Form Example
+
[state.canSubmit, state.isSubmitting]}
+ children={([canSubmit, isSubmitting]) => (
+ <>
+
+ {isSubmitting ? '...' : 'Submit'}
+
+ form.reset()}>
+ Reset
+
+ >
+ )}
+ />
+
+
+ )
+}
+
+const rootElement = document.getElementById('root')!
+
+createRoot(rootElement).render(
+
+
+ ,
+)
diff --git a/examples/react/compiler/tsconfig.json b/examples/react/compiler/tsconfig.json
new file mode 100644
index 000000000..22b43163b
--- /dev/null
+++ b/examples/react/compiler/tsconfig.json
@@ -0,0 +1,23 @@
+{
+ "compilerOptions": {
+ "target": "ESNext",
+ "lib": ["DOM", "DOM.Iterable", "ESNext"],
+ "module": "ESNext",
+ "skipLibCheck": true,
+
+ /* Bundler mode */
+ "moduleResolution": "Bundler",
+ "allowImportingTsExtensions": true,
+ "resolveJsonModule": true,
+ "isolatedModules": true,
+ "noEmit": true,
+ "jsx": "react-jsx",
+
+ /* Linting */
+ "strict": true,
+ "noUnusedLocals": true,
+ "noUnusedParameters": true,
+ "noFallthroughCasesInSwitch": true
+ },
+ "include": ["src"]
+}
diff --git a/examples/react/compiler/vite.config.ts b/examples/react/compiler/vite.config.ts
new file mode 100644
index 000000000..a152a8424
--- /dev/null
+++ b/examples/react/compiler/vite.config.ts
@@ -0,0 +1,16 @@
+import { defineConfig } from 'vite'
+import react from '@vitejs/plugin-react'
+
+const ReactCompilerConfig = {}
+
+export default defineConfig(() => {
+ return {
+ plugins: [
+ react({
+ babel: {
+ plugins: [['babel-plugin-react-compiler', ReactCompilerConfig]],
+ },
+ }),
+ ],
+ }
+})
diff --git a/examples/react/field-errors-from-form-validators/package.json b/examples/react/field-errors-from-form-validators/package.json
index 3a132af49..2fc8ba153 100644
--- a/examples/react/field-errors-from-form-validators/package.json
+++ b/examples/react/field-errors-from-form-validators/package.json
@@ -17,7 +17,7 @@
"@types/react": "^18.3.3",
"@types/react-dom": "^18.3.0",
"@vitejs/plugin-react": "^4.3.3",
- "vite": "^5.4.10"
+ "vite": "^5.4.11"
},
"browserslist": {
"production": [
diff --git a/examples/react/next-server-actions/package.json b/examples/react/next-server-actions/package.json
index d884fa8d0..7811db920 100644
--- a/examples/react/next-server-actions/package.json
+++ b/examples/react/next-server-actions/package.json
@@ -9,6 +9,7 @@
},
"dependencies": {
"@tanstack/react-form": "^0.38.0",
+ "@tanstack/react-store": "^0.5.6",
"next": "15.0.3",
"react": "19.0.0-rc-5dcb0097-20240918",
"react-dom": "19.0.0-rc-5dcb0097-20240918"
diff --git a/examples/react/next-server-actions/src/app/client-component.tsx b/examples/react/next-server-actions/src/app/client-component.tsx
index 2f754b49a..8942b7477 100644
--- a/examples/react/next-server-actions/src/app/client-component.tsx
+++ b/examples/react/next-server-actions/src/app/client-component.tsx
@@ -3,6 +3,7 @@
import { useActionState } from 'react'
import { mergeForm, useForm, useTransform } from '@tanstack/react-form'
import { initialFormState } from '@tanstack/react-form/nextjs'
+import { useStore } from '@tanstack/react-store'
import someAction from './action'
import { formOpts } from './shared-code'
@@ -17,7 +18,7 @@ export const ClientComp = () => {
),
})
- const formErrors = form.useStore((formState) => formState.errors)
+ const formErrors = useStore(form.store, (formState) => formState.errors)
return (