Skip to content

Location returned from useLocation() is "/" for routes with "empty" path ("") #472

Answered by molefrog
acelaya asked this question in Q&A
Discussion options

You must be logged in to vote

Also, we assume that "" is not a valid location and it should always start with a slash. This simplifies many things internally such as relative routes, nesting etc.

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@acelaya
Comment options

Answer selected by acelaya
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