UNPKG

@shopgate/pwa-common

Version:

Common library for the Shopgate Connect PWA.

5 lines 394 B
import{ACTION_REPLACE}from'@virtuous/conductor';import*as actions from"../../action-creators/router";/** * @param {Route} prev The previous route. * @param {Route} next The next route. * @returns {Function} */export function routeWillReplace(prev,next){return function(dispatch){dispatch(actions.routeWillLeave(prev,ACTION_REPLACE));dispatch(actions.routeWillEnter(next,ACTION_REPLACE));};}