Child routes with path="/" can't be matched
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 795
- Forks
- 55
- Avg merge
- 5h 5m
- Merged PRs (30d)
- 2
Description
I'm looking to group a very large amount of routes under a multi-tenant context such as https://acme.com/mytenant
This url should pull tenantName = mytenant and hit the / Route.
This works fine:
<Route
path="/:tenantName/"
Component={loadable(() => import('./DashboardPage'))}
/>
But this does not:
<Route path="/:tenantName">
<Route
path="/"
Component={loadable(() => import('./DashboardPage'))}
/>
</Route>
Are path props overrides or are they additive?
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the nested Route example for /:tenantName with a child path of "/", then trace the route matching and path handling entry points. Confirm whether child paths are additive or overriding, and consider the issue done when the URL /mytenant matches the child route while exposing tenantName as mytenant.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- react, typescript
- Domain
- frontend, web-dev
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100