mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-18 03:00:58 +08:00
feat(react): React Router Enhancements (#21693)
This commit is contained in:
13
packages/react/src/routing/StackContext.tsx
Normal file
13
packages/react/src/routing/StackContext.tsx
Normal file
@ -0,0 +1,13 @@
|
||||
import React from 'react';
|
||||
|
||||
import { RouteInfo } from '../models/RouteInfo';
|
||||
|
||||
export interface StackContextState {
|
||||
registerIonPage: (page: HTMLElement, routeInfo: RouteInfo) => void;
|
||||
isInOutlet: () => boolean;
|
||||
}
|
||||
|
||||
export const StackContext = React.createContext<StackContextState>({
|
||||
registerIonPage: () => undefined,
|
||||
isInOutlet: () => false
|
||||
});
|
Reference in New Issue
Block a user