React Routes Switch in Ionic can not route to an IonPage
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 32/100
- Issue type
- Documentation
- Clarity
- Needs clarification
- Activity status
- Stale
- Tech stack
- react
- Domain
- documentation
Research direction
Start with the React navigation documentation at the URL in the issue, especially the section on switches in IonRouterOutlet. Determine whether the example or its explanation should address routing to components wrapped in IonPage; done means the documentation accurately explains the supported behavior and limitation.
Written by the indexing model from the issue text.
Description
URL
https://ionicframework.com/docs/react/navigation#switches-in-ionrouteroutlet
Issue Description
The Switch component can not route to a sub component that is wrapped in IonPage.
This is what I think is the reason.
Because IonPage is exclusive, there can only be a single IonPage in a view. The Switch can not route to a component with IonPage. As shown by the React Router documentation "basic" example, a custom page component can implement a list of links that uses a Switch to route a subview of components below it within the same view. This would result in nested IonPage components, and therefore doesn't work.
The Switch component is useful only in the case where you want to insert components into a subview that will update the URL and work with the history stack, but in a way that is not tabs.
- Dominant language
- MDX
- Stars
- 621
- Forks
- 3.2k
- Avg merge
- 1d 2h
- Merged PRs (30d)
- 86
Contributor guide
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.
More from ionic-team/ionic-docs
-
content
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
ionic-team/ionic-docs#4705 ·
-
content package: angular
Difficulty 2/5 Half a day Newbie friendliness 78/100
ionic-team/ionic-docs#4702 ·
-
triage
Difficulty 1/5 Under an hour Newbie friendliness 80/100
ionic-team/ionic-docs#4546 ·
-
content: broken link Opencontent
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
ionic-team/ionic-docs#4381 · 2 comments ·
-
triage
Difficulty 1/5 Under an hour Newbie friendliness 72/100
ionic-team/ionic-docs#3639 ·
All issues in ionic-team/ionic-docs
Similar issues
-
user-reported
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
Kong/developer.konghq.com#7316 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
HarperFast/skills#96 ·
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
infinispan/infinispan#18150 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 78/100
fullcalendar/fullcalendar#8106 ·