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
In this code, when accessed with http://localhost:5173// in browser, the path attribute matches the Route with / to render <div>Main Page</div>.
Although the URL ending with // is close to invalid URL, it is expected that <div>Undefined Fallback Page</div> will be rendered by matching the Route defining the path property as *. http://localhost:5173// and http://localhost:5173/ are different URLs, and http://localhost:5173// is not defined as Route in that code.
I wonder if this behavior is a bug or an intended one. If it's a bug, I'd like to create a Pull Request so that it matches with * path Route when I access with //. Please let me know if I misunderstood anything. Thx!
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello. I open a discussion because there was a bit of ambiguity in the action of BrowserRouter.
I defined simple BrowserRouter and Route in this repository. The code that defines BrowserRouter is as follows.
In this code, when accessed with
http://localhost:5173//
in browser, the path attribute matches the Route with/
to render<div>Main Page</div>
.Although the URL ending with
//
is close to invalid URL, it is expected that<div>Undefined Fallback Page</div>
will be rendered by matching the Route defining the path property as*
.http://localhost:5173//
andhttp://localhost:5173/
are different URLs, andhttp://localhost:5173//
is not defined as Route in that code.I wonder if this behavior is a bug or an intended one. If it's a bug, I'd like to create a Pull Request so that it matches with
*
path Route when I access with//
. Please let me know if I misunderstood anything. Thx!Beta Was this translation helpful? Give feedback.
All reactions