export const makeSelectLocationState = () => { let prevRoutingState; let prevRoutingStateJS; return (state) => { const routingState = state.get('routing') if (!routingState.equals(prevRoutingState)) { prevRoutingState = routingState prevRoutingStateJS = routingState.toJS() } return prevRoutingStateJS; } }