Slide 47
Slide 47 text
reducer.js
//
注文編集フォームの reducer
export const editorReducer = ReducerFactory.create({
initializer: () => {
return EditorState.empty();
},
/**
* @param {EditorState} state
* @param {Object} action - see ./actions.js
*/
handlers: (state, action) => ({
[CustomerFound]: () => {
return state.updateState({
customer: action.currentCustomer,
});
},
}),
...
});