Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

react router hooks

import { useRouteMatch } from "react-router-dom";

function BlogPost() {
  let match = useRouteMatch("/blog/:slug");

  // Do whatever you want with the match...
  return <div />;
}
Source by reactrouter.com #
 
PREVIOUS NEXT
Tagged: #react #router #hooks
ADD COMMENT
Topic
Name
8+7 =