When using createAction, we can leave the payloadCreator param undefined to make redux-actions use identity function as default.
But in recursive structure of createActions, i set the value undefined, it get's error:
Uncaught Error: Expected function, undefined, or array with payload and meta functions for BASIS/CLOSE_ALERT_BOX
The code is:
import {createActions} from 'redux-actions';
export default createActions({
BASIS: {
OPEN_ALERT_BOX: (c) => c,
CLOSE_ALERT_BOX: undefined,
OPEN_ERROR_BOX: (c) => c,
CLOSE_ERROR_BOX: undefined,
},
});
I think the recursive structure should support undefined value to use identity function for default.