What am I trying to accomplish?
I would like the path /user/${loggedInUser.id}
to go to one IonPage
and /user/:userId
to go a different IonPage.
The point being that I want ion router to cache its own instance of the loggedInUsers page while still using the same route matching strategy.
The problem is that because I don’t know what the loggedInUsers ID is until AFTER the router has been instantiated, I cannot dynamically add that route to the router. I am stuck because IonRouter works slightly differently here than react-router does. So how do I update the router routes config to include a priority route specifically for /user/${loggedInUser.id}
after the auth has loaded?
I am using React Ionic v5.