UNPKG

@wordpress/components

Version:
15 lines (13 loc) • 436 B
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';