Skip to content

Instantly share code, notes, and snippets.

View Rieranthony's full-sized avatar
🧑‍🍳
Cooking

Anthony Riera Rieranthony

🧑‍🍳
Cooking
View GitHub Profile
type Omit<T, K extends keyof T> = Pick<T, Exclude<keyof T, K>>;
export function withAppContext<
P extends { appContext?: AppContextInterface },
R = Omit<P, 'appContext'>
>(
Component: React.ComponentClass<P> | React.StatelessComponent<P>
): React.SFC<R> {
return function BoundComponent(props: R) {
return (