mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2026-03-13 10:22:08 +08:00
feat(IonReactMemoryRouter): migrate to rr6 memory router
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import type { Action as HistoryAction, Location as HistoryLocation, MemoryHistory } from 'history';
|
||||
import React from 'react';
|
||||
import type { MemoryRouterProps } from 'react-router';
|
||||
import { Router } from 'react-router';
|
||||
import { MemoryRouter } from 'react-router';
|
||||
|
||||
import { IonRouter } from './IonRouter';
|
||||
|
||||
@@ -43,9 +43,9 @@ export class IonReactMemoryRouter extends React.Component<IonReactMemoryRouterPr
|
||||
render() {
|
||||
const { children, ...props } = this.props;
|
||||
return (
|
||||
<Router {...props}>
|
||||
<MemoryRouter {...props}>
|
||||
<IonRouter registerHistoryListener={this.registerHistoryListener}>{children}</IonRouter>
|
||||
</Router>
|
||||
</MemoryRouter>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user