How to set root page on ionic 5 react

Hi,
How to set root page using ionic 5 react ?

Thank You

Not sure I understand your question. Isn’t the ā€œroot pageā€ just the one you map to the / path, like in this router example?

NavController had an option to set root page, this way back button can be displayed (I worked on angular).
but recently i have working with react version and I don’t see that option in documentation.

Since V3’s NavController was not tied to actual browser history, this made it possible. But modern routers rely on browser history to help out here. You could use history.replace from react router, but you shouldn’t be clearing app history.

1 Like

how do I controll animation direction on page using react ? i just see 2 mode option but there is not direction
any idea how to set direction on page transition, i want to create tabs with sliding page transition.

As per your comment, I am trying to use history. replace, but many times it is not navigating to that page.

For example, I am on the login page, Now after login, I want to make the Home page as Root page so I am calling replace(ā€˜Home’) to display the Home page from the login page, but the home page is not shown

If I use history.push(Home) then it is going to Home pages, but in that case, user can come back to login page from the home

@HardikSA can you provide a sample app to inspect?