What is the cleanest way to pass route parameters to component files?
I couldn't find a clear-cut example within the documentation on how you handle it when your components live in components files and your routes live under the routes path. I want to use things like use params but I don't know how to get to them without using it directly within the route file. I've thought of two ways to do it and I'm not sure which one's better. Let me know which one is the preferred pattern if there is one.
Pattern 1
Determine params in the Route file and pass as props to component.Pattern 2
Use thefrom parameter in global useParams within component file:Pattern 3
Use thegetRouteApi function.