diff --git a/apps/web/app/routes/get-started.tsx b/apps/web/app/routes/get-started.tsx index f830340..b5c273e 100644 --- a/apps/web/app/routes/get-started.tsx +++ b/apps/web/app/routes/get-started.tsx @@ -231,8 +231,10 @@ export default function Component() {

Compose a zod schema that will be used in your action, mutation function, form generation, server-side validation, and client-side - validation. + validation. You can either do this in a route where you'll be submitting + a form or somewhere in your app directory of your choosing, like:

+
/app/schemas/schemaName.ts
{schemaCode} Create your mutation

@@ -247,10 +249,22 @@ export default function Component() {

Domain Functions will parse the request's formData and perform the mutation only if everything is valid. If something goes bad, - it will return structured error messages for us. + it will return structured error messages for us. We typically use + mutations in our actions, which we'll set up in the next step. You don't + want your mutation to be sent to the client since it will usually have + server side code, so you can choose to put them in a separate file like +

+
/app/domain/some-domain.ts
+

+ and import the domain for use in your action, or write your mutation + inline in the formAction in the following step.

{mutationCode} Create your action +

+ Create an action in the route where you'll be submitting a form, and + return a formAction from it. +

If the mutation is successful, formAction will redirect to{' '} successPath. If not, it will return errors and{' '} @@ -258,6 +272,10 @@ export default function Component() {

{actionCode} Create a basic form +

+ Now it's time to head down into the component and return a Form + . +

If you don't want any custom UI in the form, you can render{' '} Form without children and it will generate all the