react-native-xenon
Version:
A powerful in-app debugging tool for React Native.
18 lines (14 loc) • 612 B
text/typescript
import { createContext } from 'react';
import type { Updater } from 'use-immer';
import type { useConsoleInterceptor, useNetworkInterceptor } from '../hooks';
import type { DebuggerState } from '../types';
import type { ScaledSize } from 'react-native';
interface MainContextValue {
dimensions: ScaledSize;
debuggerState: DebuggerState;
setDebuggerState: Updater<DebuggerState>;
networkInterceptor: ReturnType<typeof useNetworkInterceptor>;
consoleInterceptor: ReturnType<typeof useConsoleInterceptor>;
}
const MainContext = createContext<MainContextValue | null>(null);
export default MainContext;