@@ -26,7 +26,7 @@ Let's start by creating a `formOption` that we'll use to share the form's shape
2626
2727``` typescript
2828// app/routes/index.tsx, but can be extracted to any other path
29- import { formOptions } from ' @tanstack/react-form'
29+ import { formOptions } from ' @tanstack/react-form-start '
3030
3131// You can pass other form options here
3232export const formOpts = formOptions ({
@@ -44,7 +44,7 @@ Next, we can create [a Start Server Function](https://tanstack.com/start/latest/
4444import {
4545 createServerValidate ,
4646 ServerValidateError ,
47- } from ' @tanstack/react-form/ start'
47+ } from ' @tanstack/react-form- start'
4848
4949const serverValidate = createServerValidate ({
5050 ... formOpts ,
@@ -93,7 +93,7 @@ Then we need to establish a way to grab the form data from `serverValidate`'s `r
9393
9494``` typescript
9595// app/routes/index.tsx, but can be extracted to any other path
96- import { getFormData } from ' @tanstack/react-form/ start'
96+ import { getFormData } from ' @tanstack/react-form- start'
9797
9898export const getFormDataFromServer = createServerFn ({ method: ' GET' }).handler (
9999 async () => {
@@ -106,13 +106,13 @@ Finally, we'll use `getFormDataFromServer` in our loader to get the state from o
106106
107107``` tsx
108108// app/routes/index.tsx
109- import { createFileRoute } from ' @tanstack/react-router'
110109import {
110+ createFileRoute
111111 mergeForm ,
112112 useForm ,
113113 useStore ,
114114 useTransform ,
115- } from ' @tanstack/react-form'
115+ } from ' @tanstack/react-form-start '
116116
117117export const Route = createFileRoute (' /' )({
118118 component: Home ,
@@ -192,7 +192,7 @@ Let's start by creating a `formOption` that we'll use to share the form's shape
192192``` typescript
193193// shared-code.ts
194194// Notice the import path is different from the client
195- import { formOptions } from ' @tanstack/react-form/ nextjs'
195+ import { formOptions } from ' @tanstack/react-form- nextjs'
196196
197197// You can pass other form options here
198198export const formOpts = formOptions ({
@@ -213,7 +213,7 @@ Next, we can create [a React Server Action](https://playfulprogramming.com/posts
213213import {
214214 ServerValidateError ,
215215 createServerValidate ,
216- } from ' @tanstack/react-form/ nextjs'
216+ } from ' @tanstack/react-form- nextjs'
217217import { formOpts } from ' ./shared-code'
218218
219219// Create the server action that will infer the types of the form from `formOpts`
@@ -255,14 +255,13 @@ Finally, we'll use `someAction` in our client-side form component.
255255' use client'
256256
257257import { useActionState } from ' react'
258- import { initialFormState } from ' @tanstack/react-form/nextjs'
259- // Notice the import is from `react-form`, not `react-form/nextjs`
260258import {
259+ initialFormState
261260 mergeForm ,
262261 useForm ,
263262 useStore ,
264263 useTransform ,
265- } from ' @tanstack/react-form'
264+ } from ' @tanstack/react-form-nextjs '
266265import someAction from ' ./action'
267266import { formOpts } from ' ./shared-code'
268267
@@ -347,7 +346,7 @@ Let's start by creating a `formOption` that we'll use to share the form's shape
347346
348347` ` ` typescript
349348// routes/_index/route.tsx
350- import { formOptions } from ' @tanstack/react-form/ remix'
349+ import { formOptions } from ' @tanstack/react-form- remix'
351350
352351// You can pass other form options here
353352export const formOpts = formOptions ({
@@ -367,7 +366,7 @@ import {
367366 ServerValidateError ,
368367 createServerValidate ,
369368 formOptions ,
370- } from ' @tanstack/react-form/ remix'
369+ } from ' @tanstack/react-form- remix'
371370
372371import type { ActionFunctionArgs } from ' @remix-run/node'
373372
@@ -410,10 +409,10 @@ Finally, the `action` will be called when the form submits.
410409
411410``` tsx
412411// routes/_index/route.tsx
413- import { Form , useActionData } from ' @remix-run/react'
414-
415412import {
413+ Form ,
416414 mergeForm ,
415+ useActionData
417416 useForm ,
418417 useStore ,
419418 useTransform ,
0 commit comments