Why Gemfury? Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Debian packages RPM packages NuGet packages

Repository URL to install this package:

Details    
@skava/router / dist / deps / isUniqRouteChange.js
Size: Mime:
"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