Rendered together routes with parameters and chars
See original GitHub issueUsing this:
<Route path="/player/new">
<New />
</Route>
<Route path="/player/:playerID" let:params>
<Show playerID={params.playerID} />
</Route>
or this:
<Route path="/player/*">
<Route path="/new">
<New />
</Route>
<Route path="/:playerID" let:params>
<Show playerID={params.playerID} />
</Route>
</Route>
it renders /player/new
and /player/123
together.
Expected
It should render <New />
if I’m on /player/new
and <Show />
if I’m on /player/*
(everything is not /player/new
).
Am I wrong?
Issue Analytics
- State:
- Created 3 years ago
- Comments:19 (19 by maintainers)
Top Results From Across the Web
About Routing with Express. We look at special characters ...
Placeholders for route parameters are specified by using a colon in front of the placeholder name. We call next to chain multiple route...
Read more >React Router DOM: How to handle routing in web apps
React Router DOM contains the DOM bindings for React Router. Learn about its essential components and how to build routes with parameters.
Read more >How to enforce presence of searchParams on react-router-v6 ...
Only the path is used by react-router-dom Route components. Use the useSearchParams hook in the matched/routed component and check for the page ...
Read more >Match - React Router: Declarative Routing for React.js
A match object contains information about how a <Route path> matched the URL. match objects contain the following properties: params - (object) Key/value ......
Read more >Express Tutorial Part 4: Routes and controllers - MDN Web Docs
Route parameters are named URL segments used to capture values at specific positions in the URL. The named segments are prefixed with a...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Yeah, you should use
/#/page
notation for Links in REPL. Because REPL has own handler for all links inside.Nope, router store is not why tinro works. It is just URL changing handler. You have only this choices at the moment:
<Route>
inside lazyloaded component. Consider to change your architecture:Before:
After: