Issue: I need to access a URL parameter outside the component in v6.
I know I can use the useParams() hook inside the component, But what if I needed to access a URL parameter outside the component?
This is how I used to do it in version 5:
// v5:
<Route
path = "/blog/:id"
render = {
({match:{params}}) => <Post item={ getPostById(params.id) } />
}
/>
I am accessing the :id parameter outside the < Post /> component.
How can I write the previous code in v6?