You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
functionRootComponent(){constrouter=useRouter();return(<RouterProvidernavigate={(to,options)=>router.navigate({
...options,to: toasToPathOption<RegisteredRouter,'/','/'>,})}useHref={(to)=>{returnrouter.buildLocation({ to }).href;}}><Outlet/></RouterProvider>)}
Now you will get auto complete in the links, and you can use any string as well:
This would also enable using the params and search from tanstack/react-router to be typesafe:
But right now since there is no way to constrict them based on the given href they show all the options for all the routes.
I think the way to fix this would be to give RouterConfig a generic string parameter and pass it to ToPathOption but I'm not sure.
I'm not too familiar with how the types are set up for React Aria, but what I'm hoping for is this will link the href value to ToPathOption and NavigateOptions and show the correct values for search and params options.
馃Б Your Company/Team
No response
The text was updated successfully, but these errors were encountered:
馃檵 Documentation Request
Currently, if you implement it as the documentation has explained, you get this error:
To get rid of the error, you can change it to this:
But this makes the
href
becomes juststring
, and you get no auto complete.The way to get autocomplete is doing this:
And change the router provider to this:
Now you will get auto complete in the links, and you can use any string as well:
This would also enable using the
params
andsearch
fromtanstack/react-router
to be typesafe:But right now since there is no way to constrict them based on the given
href
they show all the options for all the routes.I think the way to fix this would be to give
RouterConfig
a generic string parameter and pass it toToPathOption
but I'm not sure.I'm not too familiar with how the types are set up for React Aria, but what I'm hoping for is this will link the
href
value toToPathOption
andNavigateOptions
and show the correct values forsearch
andparams
options.馃Б Your Company/Team
No response
The text was updated successfully, but these errors were encountered: