Fallback/404 redirect for IonRouterOutlet in Ionic React

I would like to have a fallback route to redirect to a URL if the URL the user requests does not exist. Traditionally this is done with a Switch component, but that is not allowed inside IonRouterOutlet. Are there any simple alternatives to this?


FWIW, Ely from the Ionic team gave a suggestion to solve this problem. While it’s not ideal for my use case, it works.

1 Like