Check out our talk at Remix Conf!

Edit values

In this example, we'll edit existing values.

const schema = z.object({
  firstName: z.string().nonempty(),
  email: z.string().nonempty().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,
    }}
  />
)