// React Router v5:
// hook without argument returns match obj of current <Route>
// or takes obj argument identical to 'props' argument of matchPath
import { useRouteMatch } from 'react-router-dom'
function BlogPost() {
let match = useRouteMatch({
'/blog/:slug',
strict: true,
sensitive: true
})
// Do something with the match...
return <div />
}