Check out our talk at Remix Conf!

Edit values

In this example, we'll edit existing values.

const schema = z.object({
  firstName: z.string().min(1),
  email: z.string().min(1).email(),
  companySize: z.number(),
  howYouFoundOutAboutUs: z.enum(['fromAFriend', 'google']),
  subscribeToNewsletter: z.boolean().default(true),
})

export default () => (
  <Form
    schema={schema}
    values={{
      firstName: 'Mary',
      email: 'mary@company.com',
      companySize: 0,
      howYouFoundOutAboutUs: 'google',
      subscribeToNewsletter: false,
    }}
  />
)