Repository URL to install this package:
|
Version:
7.0.2 ▾
|
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const exotic_1 = require("exotic");
/**
* @todo - should be callable in oneRouter specific
* needs to have immutable history list which is available
* but probably needs fork of react-router
*/
function isUniqueRouteChange(prevProps, nextProps) {
// @NOTE can use this to force every route change fetch
// return true
return (exotic_1.isObj(prevProps) &&
exotic_1.isObj(prevProps.location) &&
prevProps.location.pathname !== nextProps.location.pathname
// (prevProps.location.key !== nextProps.location.key ||
// || prevProps.location.search !== nextProps.location.search
);
}
exports.isUniqueRouteChange = isUniqueRouteChange;
exports.isUniqRouteChange = isUniqueRouteChange;
exports.default = isUniqueRouteChange;
//# sourceMappingURL=isUniqRouteChange.js.map