thomasklemm / IonicReactRouterEmptyParams

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

IonicReactRouter: Empty Params After Fallback Route Redirect Bug

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:

  1. Introducing the fallback redirect that breaks the app: Commit 1
  2. When using a <Switch> component in <IonReactRouter>, the issue gets remedied: Commit 2

Screen recording:

Ionic React Router: Empty params after Fallback Redirect bug - Watch Video

Relevant docs:

About


Languages

Language:TypeScript 65.1%Language:CSS 31.0%Language:HTML 3.9%