react/packages/react-devtools-shared/src/devtools/views/context.js

15 lines
406 B
JavaScript
Raw Normal View History

2019-01-23 03:04:37 +08:00
// @flow
2019-08-14 08:58:03 +08:00
import {createContext} from 'react';
2019-01-23 03:04:37 +08:00
import Store from '../store';
2019-08-14 08:58:03 +08:00
import type {FrontendBridge} from 'react-devtools-shared/src/bridge';
export const BridgeContext = createContext<FrontendBridge>(
2019-08-14 08:58:03 +08:00
((null: any): FrontendBridge),
);
BridgeContext.displayName = 'BridgeContext';
2019-01-24 00:45:19 +08:00
export const StoreContext = createContext<Store>(((null: any): Store));
2019-02-02 01:25:54 +08:00
StoreContext.displayName = 'StoreContext';