Skip to content

Instantly share code, notes, and snippets.

View deadkff01's full-sized avatar
🪐

Dennis Kaffer deadkff01

🪐
View GitHub Profile
@deadkff01
deadkff01 / withGlobal.tsx
Created September 28, 2021 19:54
withGlobal HOC
import { FC, useCallback } from "react";
import { useGlobal, ACTIONS, GlobalContextProps } from "../contexts/global";
export interface IGlobal extends GlobalContextProps {
requestHandler: (requestFunction: () => {}) => Promise<any>;
}
interface IWrappedComponent {
global: IGlobal;
}