Skip to main content
This component is returned by Settings.useForm().

Example: Conditional fields

<WithState /> allows you to access the current settings values via render props in the JSX, so you can conditionally render fields based on other settings.
src/app/settings/page.tsx

Props

boolean
Whether or not to request the form validation errors.Defaults to false.If true, the errors will be passed to the children render prop.
boolean
Whether or not to request the current settings values.Defaults to false.If true, the values will be passed to the children render prop.
({ errors, values }) => React.ReactNode
A render prop that receives the requested form state.

errors? : Object

An object of form validation errors in the same shape as your settings values.

values? : Object

The current values of your workspace settings.