Marcus Nielsen
Aug 23, 2017 · 1 min read

I tend to use pure components and bind it outside in a normal js closure.

const makeComponent = ({actions}) => {

const onChange = evt => { actions.setValue(evt.target.value)}

return ({state}) => <input onChange={onChange} />

(Writing on my mobile, so tell me if it looks too crappy, and I will write a better example later on.)

Is there a cost to using closures that I’m not understanding? Why use class-based?

)