Form / foldkit-mixins-form

Start without customization

Given Edit, a Form.make result from the Form example, the default rendering path is:

ts
import { Bundle } from 'foldkit-bundle'
import { FormView } from 'foldkit-mixins-form'

const Drawn = Edit.bundle.pipe(
  Bundle.withView(FormView.submodel(Edit, FormView.define(Edit))),
)

Declare and place Drawn using the normal Bundle API, with the form's onOut handler. Rendering that placement shows the controls; typing routes the form's Messages to its reducer; submitting a valid form sends its decoded value to onOut. No request is made unless that handler returns one.

The next example replaces this unstyled Drawn with field and form styles.