lenrix
lenrix copied to clipboard
.updates(): allow a handler to return null or false to prevent a state update
Currently, one can return (state) => state
searchBeerName: name => name.length > 0
? _.focusPath('loading').setValue(true)
: state => state,
Returning null
would look like:
searchBeerName: name => name.length > 0
? _.focusPath('loading').setValue(true)
: null,
Returning false
would look like:
searchBeerName: name => name.length > 0 && _.focusPath('loading').setValue(true)