Open Aaronius opened 6 years ago
Here's the code for routerReducer that's compatible with the v5 alpha of react-router-redux:
import Immutable from 'seamless-immutable';
import { LOCATION_CHANGE } from 'react-router-redux';
const initialState = Immutable({
location: null
});
export function routerReducer(state = initialState, { type, payload } = {}) {
if (type === LOCATION_CHANGE) {
return state.set('location', payload);
}
return state;
}
You could open a PR for it
react-router-redux has a v5 alpha that's incompatible with redux-seamless-immutable. It would be fantastic to have a matching alpha of redux-seamless-immutable that worked with it. One incompatibility I'm aware of is the router reducer of v5 alpha sets
location
instead oflocationBeforeTransitions
.