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    
  ..
  __unused
  deps
  observable
  react-router-config
  Context.tsx
  OneRouterProvider.tsx
  OneRouterToRuleThemAll.ts
  README.md
  config.ts
  index.ts
  makeHistory.ts
  oneRouter.ts
  typings.ts
Size: Mime:

@todo add observable update in link-view

observe with weakmap

    /**
     * @api https://mobx.js.org/refguide/observe
     */
    // observe(this, subscriber)
    // observe(this.store, subscriber)
    // if (this.observersList.includes(subscriber) === false) {
    // this.observersList.set(subscriber, true)
    // this.observersList.push(subscriber)
    // const subscribeToRouteChange = this.get('subscribe')
    // this.router && this.router.history && this.router.history.listen

matched


  // this.log(pathname, { routePathCurrent, matchedFromPath, pathname })
  // const params = { ...matchedFromPath, ...matchedFromPath.params }
  // access to which route had the data
  // Object.defineProperty(matched, '@@matches', {
  //   writable: false,
  //   configurable: false,
  //   enumerable: false,
  //   value: matchedFromPath,
  // })

  // react router always counts this as root
  // if (this.props && isObj(this.props.match)) {
  //   // matched = {
  //   //   ...matched,
  //   //   ...this.props.match,
  //   //   ...this.props.match.params,
  //   // }
  //   Object.assign(matched, this.props.match.params)
  // }
  // else {
  //   matched.match = matched
  // }

isFullyQualifiedNamespace?

      // check our local routes
      // otherwise goto
      // routePathsList.includes(to)
      // return this.router.goto(to)

location

  get urlFromExpress(): OneUrl {
    return isObj(this.router) && isObj(this.router.location)
      ? this.location.full || ''
      : ''
  }