UNPKG

redux-first-router

Version:

think of your app in states not routes (and, yes, while keeping the address bar in sync)

8 lines (5 loc) 222 B
// @flow import { ADD_ROUTES } from '../index' import type { RoutesMap, Dispatch } from '../flow-types' export default (routes: RoutesMap) => (dispatch: Dispatch) => dispatch({ type: ADD_ROUTES, payload: { routes } })