I am working on an Ionic react application (v5.0.7).
I have all my paths inside
For the navigation stack management, setting root I am using
history.replace() method, but it is not navigating to that screen.
I have a scenario like. From the login screen after the correct login, I want to set root as a Home screen. So I am using
history.replace() to navigate to the Home screen, but the home page is not shown (willEnter,DidEnter none of the methods are called).
In Route element, if I console in the render method of home it prints the log, and in Ionic serve the URL is also changed on the top but the page is not changed (no error in console for this)
Now with the same code if I just change history.replace() to history.push(). it starts working and navigate to the home page, but it will allow logged in user to go back to the login screen without login
What can be an issue in this as it is not displaying the home screen