useSearch with validateSearch in _layout
I have the following routing structure
in
_layout.tsx I use <Outlet/> to render what index.tsx is rendering.
And I also do search validation for the foorBar search param.
Then inside my component, I do
And I get Property 'fooBar' does not exist on type '{}'.
However, if I do the following, it's inferred correctly.
Do I make a mistake here, or is this how it should be? Because I can access the path params without any issues with /post/$postId when using useParams1 Reply
equal-aqua•14mo ago
can you please provide a complete minimal example?