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 / src / __unused / OldOneRouterComponentDeprecatedContext.tsx
Size: Mime:

/**
 * @note this is not used anywhere
 * @todo split this out
 * @todo there is no state
 * @description provide it all the way down through context
 * @withRouter
 */
class OneRouter extends React.Component<{ history: any }, { match: any }> {
  static childContextTypes = {
    router: object.isRequired,
    oneRouter: object,
  }
  getChildContext() {
    return {
      oneRouter,
      router: {
        ...this.context.router,
        history: this.props.history,
        route: {
          location: this.props.history.location,
          match: this.state.match,
        },
      },
    }
  }
}

// PureComponent
// @withRouter