use input as store/reducer

This commit is contained in:
Shin'ya Ueoka 2017-09-14 21:40:28 +09:00
parent c42ac8fac4
commit 6127fdc285
5 changed files with 44 additions and 37 deletions

View file

@ -1,7 +1,11 @@
import inputReducer from '../reducers/input';
const defaultState = {
input: inputReducer(undefined, {})
};
export default function reducer(state = defaultState/*, action = {}*/) {
export default function reducer(state = defaultState, action = {}) {
return Object.assign({}, state, {
input: inputReducer(state.input, action)
});
}