This repo is meant to illustrate the bug described in ionic-team/ionic-framework#23743.
When using a <Redirect>
(without a path, as a fallback route) in <IonRouterOutlet>
, param parsing breaks for the entire user session until a reload is happening.
match.params
is always an empty object from then on.
Relevant commits:
- Introducing the fallback redirect that breaks the app: Commit 1
- When using a
<Switch>
component in<IonReactRouter>
, the issue gets remedied: Commit 2
Ionic React Router: Empty params after Fallback Redirect bug - Watch Video
Relevant docs:
- Ionic React Routing: Fallback Route
- Ionic React Routing: Switches in
<IonRouterOutlet>
Switch isn't supposed to make a difference (but it actually does)