Skip to content

Commit e297373

Browse files
docs(react): missing useStore imports (#1312)
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
1 parent 85adb93 commit e297373

File tree

1 file changed

+18
-3
lines changed
  • docs/framework/react/guides

1 file changed

+18
-3
lines changed

docs/framework/react/guides/ssr.md

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,12 @@ Finally, we'll use `getFormDataFromServer` in our loader to get the state from o
102102
```tsx
103103
// app/routes/index.tsx
104104
import { createFileRoute } from '@tanstack/react-router'
105-
import { mergeForm, useForm, useTransform } from '@tanstack/react-form'
105+
import {
106+
mergeForm,
107+
useForm,
108+
useStore,
109+
useTransform,
110+
} from '@tanstack/react-form'
106111

107112
export const Route = createFileRoute('/')({
108113
component: Home,
@@ -241,7 +246,12 @@ Finally, we'll use `someAction` in our client-side form component.
241246
import { useActionState } from 'react'
242247
import { initialFormState } from '@tanstack/react-form/nextjs'
243248
// Notice the import is from `react-form`, not `react-form/nextjs`
244-
import { mergeForm, useForm, useTransform } from '@tanstack/react-form'
249+
import {
250+
mergeForm,
251+
useForm,
252+
useStore,
253+
useTransform,
254+
} from '@tanstack/react-form'
245255
import someAction from './action'
246256
import { formOpts } from './shared-code'
247257

@@ -385,7 +395,12 @@ Finally, the `action` will be called when the form submits.
385395
// routes/_index/route.tsx
386396
import { Form, useActionData } from '@remix-run/react'
387397

388-
import { mergeForm, useForm, useTransform } from '@tanstack/react-form'
398+
import {
399+
mergeForm,
400+
useForm,
401+
useStore,
402+
useTransform,
403+
} from '@tanstack/react-form'
389404
import {
390405
ServerValidateError,
391406
createServerValidate,

0 commit comments

Comments
 (0)