Hey, Im having a weird issue with IonTabs.
First of all, this is my related code:
const Menu = props => {
return(
<IonContent>
<IonTabs>
<TabRouters />
<IonTabBar>
<IonTabButton>
A
</IonTabButton>
<IonTabButton>
B
</IonTabButton>
<IonTabButton>
C
</IonTabButton>
</IonTabBar>
</IonTabs>
</IonContent>
)
}
Inside the component is a
export const TabRouters = props => {
return(
<IonRouterOutlet>
//routers
</IonRouterOutlet>
)
}
This actually throws this error:
Error: IonTabs must contain an IonRouterOutlet
But when I paste whats returned in the component directly into the component, it works.
This must be a bug, which really confuses me. I’d really like to have the <IonRouterOutlet in a seperate component.
I am very new at Ionic, so maybe I am doing something wrong, I dont see…
Im grateful for any help!