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