0
所以我有一大堆的鸭式的终极版的模块,像这样:终极版,行动handleActions是不会改变的状态
import { createAction, handleActions } from 'redux-actions'
const SET = "error/SET"
const CLEAR = "error/CLEAR"
export default handleActions({
SET: (error, action) => action.payload,
CLEAR: (error, action) => ""
}, "")
export const setError = createAction(SET)
export const clearError = createAction(CLEAR)
然后,在reducers.js我这样做:
import error from './error'
export default combineReducers({
error,
...
})
但
,当我派遣(SETERROR(“ERROR”))我看到终极版devtools的动作,但状态不改变