fix(react-router): remove page transition flicker on outlet mounting (#24667)

Resolves #24666
This commit is contained in:
Sean Perkins
2022-01-27 16:29:52 -05:00
committed by GitHub
parent 6d7b1444b6
commit bdb5c421d2
5 changed files with 83 additions and 4 deletions

View File

@ -99,7 +99,7 @@ export const IonTabs = /*@__PURE__*/ (() =>
return;
}
if (child.type === IonRouterOutlet || child.type.isRouterOutlet) {
outlet = React.cloneElement(child, { tabs: true });
outlet = React.cloneElement(child);
} else if (child.type === Fragment && child.props.children[0].type === IonRouterOutlet) {
outlet = child.props.children[0];
}