Prerequisites
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 install and npm 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.
Prerequisites
Ionic Framework Version
v8.x, v9.x, Nightly
Current Behavior
When
IonRouterOutletis the only child of a React Fragment passed toIonTabs, rendering throws:IonTabstreats the Fragment's children as an array, but React stores a single child as an element.Expected Behavior
IonTabsshould render whenIonRouterOutletis wrapped in a single-child Fragment.Steps to Reproduce
npm installandnpm run dev.Code Reproduction URL
https://github.com/Benziza/ion-tabs-fragment-repro
Ionic Info
Additional Information
Removing the Fragment allows the same app to render.