Skip to content

Route information is lost on vite HMR #4103

Answered by schiller-manuel
alsersan asked this question in Q&A
Discussion options

You must be logged in to vote

i fixed the HMR issue, it will be released as soon as we merge the devinxi branch.

however, please be aware that importing the routes and using them like you do might result in circular type dependencies that typescript might complain about. hence we recommend using string literals always.

about the difference of from for navigation and from for useSearch etc:

when navigating, from represents a path as it will be in the URL at runtime.

when using e.g. useSearch, you need to specify a route id for which you want to read the search params. with pathless routes, a path alone would not suffice to describe a route, hence the id is required.

Replies: 2 comments 4 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
4 replies
@alsersan
Comment options

@schiller-manuel
Comment options

@alsersan
Comment options

@schiller-manuel
Comment options

Answer selected by alsersan
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants