UNPKG

@randy.tarampi/jsx

Version:

Some common JSX components for www.randytarampi.ca

10 lines (9 loc) 312 B
import { LOCATION_CHANGE } from "connected-react-router/immutable"; import clearError from "../actions/error/clearError"; export var routerMiddleware = store => next => action => { if (action.type === LOCATION_CHANGE) { store.dispatch(clearError()); } next(action); }; export default routerMiddleware;