Closed monkseal closed 6 years ago
import { routerActions } from "react-router-redux"; const mapDispatchToProps = (dispatch) => ({ onChange: (newPath) => { if (!newPath) { return; } dispatch(routerActions.push(newPath)); } });
With a reducer:
const routerReducer = (state = defaultRouterState, { type, payload } = {}) => { if (type === LOCATION_CHANGE) { return { ...state, location: payload }; } return state; };
However when the action is trigger, there is no LOCATION_CHANGE (or any other action) dispatched to the reducer? Is this by design?
LOCATION_CHANGE
This is a bug tracker, not a support system. For usage questions, please use Stack Overflow or Reactiflux where there are a lot more people ready to help you out. Thanks!
With a reducer:
However when the action is trigger, there is no
LOCATION_CHANGE
(or any other action) dispatched to the reducer? Is this by design?