Quantcast
Channel: Ionic Forum - Latest topics
Viewing all articles
Browse latest Browse all 70779

Nested routes/pages inside IonTabs? (v4 React)

$
0
0

@benallfree wrote:

I’m having a heck of a time getting nested routes to work inside an IonTabs component. Is this basic structure allowed?

All goes well for a while, but hitting the tab button again to return to the /shop root seems to make the other pages permanently disappear. I suspect there is a bug in IonRouterOutlet because if I remove it (and <IonTabs>) navigation works fine.

<IonApp>
        <IonReactRouter>
          <IonTabs>
            <IonRouterOutlet>
              <Route path="/:tab(shop)" component={Shop} />
              <Route path="/:tab(shop)/:item" component={Item} />
              <Route path="/:tab(shop)/:item/detail" component={Detail} />
            </IonRouterOutlet>
            <IonTabBar slot="bottom">
              <IonTabButton tab="shop" href="/shop">
                <IonIcon icon={pricetag} />
                <IonLabel>Shop</IonLabel>
              </IonTabButton>
            </IonTabBar>
          </IonTabs>
        </IonReactRouter>
      </IonApp>

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 70779

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>