bug: IonTabs throws when a Fragment contains one IonRouterOutlet
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 72/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- react, typescript
- Domain
- frontend
Research direction
Start with the IonTabs implementation and reproduce the failure using the linked app with npm install and npm run dev. Confirm the fix by rendering an IonRouterOutlet as the only child in a React Fragment passed to IonTabs without the TypeError.
Written by the indexing model from the issue text.
Description
Prerequisites
- I have read the contributing guidelines.
- I agree to follow the Code of Conduct.
- I searched existing issues without finding this problem.
Ionic Framework Version
v8.x, v9.x, Nightly
Current Behavior
When IonRouterOutlet is the only child of a React Fragment passed to IonTabs, rendering throws:
TypeError: Cannot read properties of undefined (reading 'type')
IonTabs treats the Fragment's children as an array, but React stores a single child as an element.
Expected Behavior
IonTabs should render when IonRouterOutlet is wrapped in a single-child Fragment.
Steps to Reproduce
- Clone the reproduction.
- Run
npm installandnpm run dev. - Open the app.
Code Reproduction URL
https://github.com/Benziza/ion-tabs-fragment-repro
Ionic Info
Ionic CLI : 7.2.1
Ionic Framework : @ionic/react 9.0.1
NodeJS : v25.6.0
npm : 11.12.1
OS : Windows 10
Additional Information
Removing the Fragment allows the same app to render.
- Dominant language
- TypeScript
- Stars
- 52.7k
- Forks
- 13.3k
- Avg merge
- 2d 20h
- Merged PRs (30d)
- 35
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-framework
-
triage
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
ionic-team/ionic-framework#31314 ·
-
triage
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
ionic-team/ionic-framework#31291 ·
-
triage
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
ionic-team/ionic-framework#30738 ·
-
package: core type: bug
Difficulty 1/5 Under an hour Newbie friendliness 72/100
ionic-team/ionic-framework#29864 · 1 comment ·
-
package: core type: feature request
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
ionic-team/ionic-framework#29607 · 4 comments · 1 reaction ·
All issues in ionic-team/ionic-framework
Similar issues
-
comp/desktop P3 type/bug
Difficulty 1/5 Under an hour Newbie friendliness 92/100
NousResearch/hermes-agent#118866 ·
-
Browser Waiting for: Product Owner
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
getsentry/sentry-javascript#24577 · 1 comment ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
agilepathway/label-checker#640 ·
-
Plugin stuck at "loading" on DSH 0.1.6-alpha.2 — turnTail list slot registration missing options.id Open
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
chrisparsons83/flexspotff#153 ·