How to use the createHref function from history

Find comprehensive JavaScript history.createHref code examples handpicked from public code repositorys.

377
378
379
380
381
382
383
384
385
386
export const Link = React.forwardRef(function(_ref2){
  var _ref2$component = _ref2.component === void 0 ? LinkAnchor : _ref2.component, to = _ref2.to;
  return React.createElement(context.Consumer, null, function (context) {  
    var history = context.history;
    var location = normalizeToLocation(resolveToLocation(to, context.location), context.location);
    var href = location ? history.createHref(location) : "";
    var props = {
      href: href,
      navigate: function navigate() {
        var location = resolveToLocation(to, context.location);
fork icon0
star icon6
watch icon0

+ 3 other calls in file