import { createContext, Dispatch, FC, ProviderProps, useContext } from 'react'; import { INavigatorAction, INavigatorState } from '../reducers/NavigatorReducer'; export interface INavigatorContext { navigatorState: INavigatorState; dispatchNavigatorState: Dispatch; } const NavigatorContext = createContext({ navigatorState: null, dispatchNavigatorState: null }); export const NavigatorContextProvider: FC> = props => { return { props.children } } export const useNavigatorContext = () => useContext(NavigatorContext);