chore(react): fixing issue with new history types (#22109)

This commit is contained in:
Ely Lucas
2020-09-17 16:03:33 -06:00
committed by GitHub
parent 99f2532ee1
commit 74632fa960
5 changed files with 1574 additions and 1334 deletions

View File

@ -4,12 +4,12 @@ import { BrowserRouterProps, Router } from 'react-router-dom';
import { IonRouter } from './IonRouter';
interface IonReactHashRouterProps<THistoryLocationState = History.PoorMansUnknown> extends BrowserRouterProps {
history?: History<THistoryLocationState>;
interface IonReactHashRouterProps extends BrowserRouterProps {
history?: History;
}
export class IonReactHashRouter extends React.Component<IonReactHashRouterProps> {
history: History<History.PoorMansUnknown>;
history: History;
historyListenHandler?: ((location: HistoryLocation, action: HistoryAction) => void);
constructor(props: IonReactHashRouterProps) {

View File

@ -2,14 +2,14 @@ import { Action as HistoryAction, Location as HistoryLocation, MemoryHistory } f
import React from 'react';
import { MemoryRouterProps, Router } from 'react-router';
import { IonRouter, LocationState } from './IonRouter';
import { IonRouter } from './IonRouter';
interface IonReactMemoryRouterProps extends MemoryRouterProps {
history: MemoryHistory<LocationState>;
history: MemoryHistory;
}
export class IonReactMemoryRouter extends React.Component<IonReactMemoryRouterProps> {
history: MemoryHistory<LocationState>;
history: MemoryHistory;
historyListenHandler?: ((location: HistoryLocation, action: HistoryAction) => void);
constructor(props: IonReactMemoryRouterProps) {

View File

@ -4,14 +4,14 @@ import { BrowserRouterProps, Router } from 'react-router-dom';
import { IonRouter } from './IonRouter';
interface IonReactRouterProps<THistoryLocationState = History.PoorMansUnknown> extends BrowserRouterProps {
history?: History<THistoryLocationState>;
interface IonReactRouterProps extends BrowserRouterProps {
history?: History;
}
export class IonReactRouter extends React.Component<IonReactRouterProps> {
historyListenHandler?: ((location: HistoryLocation, action: HistoryAction) => void);
history: History<History.PoorMansUnknown>;
history: History;
constructor(props: IonReactRouterProps) {
super(props);