T
TanStack12mo ago
ratty-blush

If no "to" prop is present navigate({search}) results typescript error

I have a new typescript issue since latest release. I use very often
navigate({
search: ()=> someFunction
})
navigate({
search: ()=> someFunction
})
this results in a typescript issue
No description
9 Replies
ratty-blush
ratty-blushOP12mo ago
No description
ratty-blush
ratty-blushOP12mo ago
when I provide either to:"" or to:"." the type error disappears. What is recommended? Its a search which is across multiple routes so I would like to keep it loose.
solid-orange
solid-orange12mo ago
TanStack | High Quality Open-Source Software for Web Developers
Headless, type-safe, powerful utilities for complex workflows like Data Management, Data Visualization, Charts, Tables, and UI Components.
From An unknown user
From An unknown user
solid-orange
solid-orange12mo ago
use to:"."
ratty-blush
ratty-blushOP12mo ago
TanStack | High Quality Open-Source Software for Web Developers
Headless, type-safe, powerful utilities for complex workflows like Data Management, Data Visualization, Charts, Tables, and UI Components.
From An unknown user
From An unknown user
ratty-blush
ratty-blushOP12mo ago
No description
ratty-blush
ratty-blushOP12mo ago
the docs states that you dont need to supply a to prop. this lead me to omit the to everywhere, now I went through the appearances and added to=".". This might be an old example hint?
solid-orange
solid-orange12mo ago
yeah that's outdated good catch this sentence should just be deleted can you provide a PR to the docs?
ratty-blush
ratty-blushOP12mo ago

Did you find this page helpful?