Answers for "how to use userouter in class component"

0

how to use userouter in class component

const MyClassWithRouter = (props) => {
  const router = useRouter()
  return <MyClass {...props} router={router} />
}

class MyClass...
  constructor(props) {
    this.state = {
      loc: props.router.query.loc,
      loaded: false
    };
  }
Posted by: Guest on July-03-2021

Code answers related to "how to use userouter in class component"

Browse Popular Code Answers by Language