UNPKG

redux-first-router

Version:

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

17 lines (11 loc) 255 B
import setKind from '../pure-utils/setKind'; export default (function (action, type, payload) { action = setKind(action, 'redirect'); if (type) { action.type = type; } if (payload) { action.payload = payload; } return action; });