Type Inference with useParams and useSearch?
Hoping someone can help me understand why I am not seeing the correct types when using
useParams and useSearch. Here is the route definition:
And then in the component tree:
I am correct in assuming these should be typed accordingly?2 Replies
wise-white•3y ago
This should work. But hard to say why without a reproduction
foreign-sapphire•3y ago
@ryantbrown Did you figure out why in the end?
When using
useParams I'm getting some circular dependency errors that I can't reproduce on StackBlitz 🤔
'XXX' implicitly has type 'any' because it does not have a type annotation and is referenced directly or indirectly in its own initializer.ts(7022)
presetEditRoute.useParams()