Repository URL to install this package:
|
Version:
7.0.1 ▾
|
/**
* @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