const reducers = (state, action) => {
return {
...otherReducer({state: state.other_reducer}, action),
...myReducer({state: state.myReducer} , action)
}
}
function reducer(state = {is_auth : false}, action) {
if (action.type === 'GET_AUTH') {
state.auth = action.payload;
state.is_auth = true;
}
return state;
}
function reducer(state = {is_auth : false, auth: null}, action) {
if (action.type === 'GET_AUTH') {
return {
auth: action.payload,
is_auth: true
}
}
return state;
}