consome as store/reducers
This commit is contained in:
parent
6127fdc285
commit
83cb277ba2
17 changed files with 171 additions and 236 deletions
|
@ -1,11 +1,14 @@
|
|||
import inputReducer from '../reducers/input';
|
||||
import consoleReducer from '../reducers/console';
|
||||
|
||||
const defaultState = {
|
||||
input: inputReducer(undefined, {})
|
||||
input: inputReducer(undefined, {}),
|
||||
console: consoleReducer(undefined, {})
|
||||
};
|
||||
|
||||
export default function reducer(state = defaultState, action = {}) {
|
||||
return Object.assign({}, state, {
|
||||
input: inputReducer(state.input, action)
|
||||
input: inputReducer(state.input, action),
|
||||
console: consoleReducer(state.console, action)
|
||||
});
|
||||
}
|
||||
|
|
Reference in a new issue