@wordpress/components
Version:
UI components for WordPress.
15 lines (13 loc) • 436 B
text/typescript
import { createContext } from '@wordpress/element';
import type { NavigatorContext as NavigatorContextType } from './types';
const initialContextValue: NavigatorContextType = {
location: {},
goTo: () => {},
goBack: () => {},
goToParent: () => {},
addScreen: () => {},
removeScreen: () => {},
params: {},
};
export const NavigatorContext = createContext( initialContextValue );
NavigatorContext.displayName = 'NavigatorContext';