Skip to content

Instantly share code, notes, and snippets.

@thehappybug
Created June 15, 2018 14:13
Show Gist options
  • Save thehappybug/6e237599e36570cdc5bdf0db28c8e627 to your computer and use it in GitHub Desktop.
Save thehappybug/6e237599e36570cdc5bdf0db28c8e627 to your computer and use it in GitHub Desktop.
import * as React from 'react';
export interface AppContextInterface {
name: string,
author: string,
url: string
}
const ctxt = React.createContext<AppContextInterface | null>(null);
export const AppContextProvider = ctxt.Provider;
export const AppContextConsumer = ctxt.Consumer;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment