redux clear store
redux clear storeredux 没有内置清除 store 的功能,需要手动实现,以下是其中一个方案const addClearToReducer = (reducer: any) => (state: {}, action: { type: string; payload: any }) => { if (action.type === CLEAR) { return {}; } else { return reducer(state
原创
2021-11-15 20:02:58 ·
695 阅读 ·
0 评论