accelerator-core
Version:
[](https://travis-ci.org/furkleindustries/accelerator-core)
16 lines (13 loc) • 314 B
text/typescript
import {
IHeadersContext,
} from './IHeadersContext';
import {
createContext,
} from 'react';
let headersContext: React.Context<IHeadersContext> | null = null;
export function getHeadersContext() {
if (!headersContext) {
headersContext = createContext(undefined as any);
}
return headersContext;
}