Convenience function to update a form value. Pass the Meiosis cell and the state property (such
as 'firstName') or path (such as ['person', 'firstName']) into which to update the value.
Returns a function that you can pass to a DOM handler, such as oninput (Mithril) or onInput
(Preact, React). For example:
// Using Mithil m('input[type=text]', { oninput:updateFormValue(cell, 'firstName') })
// Using Preact/React <inputtype="text"onInput={updateFormValue(cell, ['person', 'firstName'])}/>
Returns
a function that accepts a DOM event and updates the value on the Meiosis state.
Convenience function to update a form value. Pass the Meiosis cell and the state property (such as
'firstName'
) or path (such as['person', 'firstName']
) into which to update the value. Returns a function that you can pass to a DOM handler, such asoninput
(Mithril) oronInput
(Preact, React). For example:Returns
a function that accepts a DOM event and updates the value on the Meiosis state.