import { withRouter } from "https://deno.land/x/aleph@v0.3.0-alpha.33/framework/react/mod.ts";
withRouter
injects the prop as current RouterURL
of page routing.
class MyComponent extends React.Component {
render() {
return <p>{this.props.router.pathname}</p>
}
}
export default withRouter(MyComponent)
Parameters
Component: ComponentType<P>