Open rpominov opened 8 years ago
// before <Demo props={{ value: P.string(''), onChange: P.callback.log(), }} > { (props, update) => <Input {...props} onChange={value => { update({value}); props.onChange(value) }} /> } </Demo> // after <Demo target={Input} props={{ value: P.string(''), onChange: P.callback.withUpdate((update, value) => { update({value}); return value; // whatever returned will be logged }), }} />