I'm using reactjs, react-router & redux in my application. I'm using async actions, following is my action.js code
signUser(state,user) {
return function (dispatch){
return dispatch(requestSignUp());
}
}
export default function requestSignUp(){
return {
type: Actions.REQUEST,
signUserReducer:{
action: Actions.REQUEST
}
}
}
Following is my store.js code
const reducer = combineReducers(reducers);
let finalState = compose(applyMiddleware(thunk, logger()))(createStore)
export default function configureStore(initialState) {
return finalState(reducer, initialState);
}
Following is my reducer.js code
export default function signUserReducer(state = initialState, action) {
if (typeof state == 'undefined') {
return state;
}
switch (action.type) {
case Actions.REQUEST:
return Object.assign({}, state, {
action: action.signUserReducer.action
});
default:
return state;
}
}
Now whenever I'm dispatching an action an error displays on my browser console stating
Warning: [react-router] You cannot change 'Router routes'; it will be ignored
I tried solving this with 'react-router-redux', but it's not solving.