Hello, thanks a lot for your hard work. This router works really good. The only question which I didn't find in docs is how to pass params in deep nested component? In react-router we had withRouter HOC for this. Right know I need to pass in by hands. Any suggestions?
<comp1>
<comp2>
<comp3> // here I can get query params
I would reach for React's Context API
Would be nice to see somewhere in docs an official suggestion.
I think the official suggestion would be implied where it describes route components as "just React components", so there's nothing you can't do that you could do with any React Component, and I don't think there's going to be any proprietary solution for it.
So... you could do render props from a parent, React.cloneElement with parent params, Context etc..
I've just find in docs the official solution. There is a component Location which returns location on any level.
<Location>
{({ location })=> {
// ...
}}
</Location>
Here is a link in docs
Most helpful comment
I've just find in docs the official solution. There is a component Location which returns location on any level.
Here is a link in docs