Open c0 opened 8 years ago
redux-actions doesn't provide much value. createAction is nice, but adds an unneeded abstraction.
redux-actions
createAction
This:
const REQUEST_SOMETHING = 'REQUEST_SOMETHING' const requestSomething = createAction(REQUEST_SOMETHING)
Can easily be converted to:
const REQUEST_SOMETHING = 'REQUEST_SOMETHING' const requestSomething = params => ({ ...params, type: REQUEST_SOMETHING })
Also, redux-actions adds action.payload, which at first feels right, but practically you end up checking a lot of if (action.payload && action.payload.foo) rather than if (action.foo)
action.payload
if (action.payload && action.payload.foo)
if (action.foo)
redux-actions
doesn't provide much value.createAction
is nice, but adds an unneeded abstraction.This:
Can easily be converted to: