Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/aleph/react.ts>withRouter

The Full-stack Framework in Deno.
Very Popular
Go to Latest
function withRouter
import { withRouter } from "https://deno.land/x/aleph@v0.3.0-alpha.17/react.ts";

withRouter allows you to use useRouter hook with class component.

class MyComponent extends React.Component {
  render() {
    return <p>{this.props.router.pathname}</p>
  }
}
export default withRouter(MyComponent)