DEV Community

Discussion on: Functional Programming: Alternatives to the IF #Functional #JavaScript #Functors

 
idanarye profile image
Idan Arye

I would have kept the getItem part. Without it, it's unclear why you can't just do this:

const someAction = value => dispatch => {
  value != null ? dispatch({ type: 'ACTION', value }) : null
Thread Thread
 
joelnet profile image
JavaScript Joel

Examples updated!