Answer the question
In order to leave comments, you need to log in
Why is the reducer not updating the state?
component code:
setDefaultParams() {
store.dispatch({
type: 'UPDATE_CHANGED',
payload: merge({}, this.state.changed, this.props._sharedData.request)
});
}
export default function ( state = null, action){
switch( action.type ){
case "UPDATE_CHANGED" :
return Object.assign({}, state, { filterParams : action.payload });
default : return state;
}
}
import { combineReducers } from 'redux';
import filterParams from './filters/filterParams';
import filterActions from './filters/filterActions';
export default combineReducers({
filterParams,
filterActions
})
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question