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

"Global" component on all pages to not reload

$
0
0

@grallm wrote:

Hello, I come with a little question on a problem with which I’m struggling a bit :slight_smile:

I currently have an app based on the React demo app and this App.tsx with some routes and my Menu, which is a component shared with all pages.
<IonApp> <IonReactRouter> <IonSplitPane contentId="main"> <Menu /> <IonRouterOutlet id="main"> <Route path="/home" component={HomePage} /> <Route path="/products" component={ProductPage} exact /> <Route path="/favorites" component={ProductPage} /> <Route render={(): JSX.Element => <Redirect to="/home" />} /> </IonRouterOutlet> </IonSplitPane> </IonReactRouter> </IonApp>
I know have a Header component present in all my pages in a IonPage component but I would like it to not “refresh/reload” on each page changing, is it possible to add it in App.tsx to do this ?

I also just read that IonRouterOutlet should only be used for Angular, is it true ? What should I do ?

Thanks a lot.
Malo.

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 70440

Trending Articles



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