Skip to content

Instantly share code, notes, and snippets.

@thehappybug
Last active June 15, 2018 16:06
Show Gist options
  • Save thehappybug/9a781224ac0a513e074f6d5789122fac to your computer and use it in GitHub Desktop.
Save thehappybug/9a781224ac0a513e074f6d5789122fac to your computer and use it in GitHub Desktop.
import * as React from 'react';
import { AppContextInterface, AppContextProvider } from './AppContext';
const sampleAppContext: AppContextInterface = {
name: 'Using React Context in a Typescript App',
author: 'thehappybug',
url: 'http://www.example.com'
};
export const App = () => (
<AppContextProvider value={sampleAppContext}>
...
</AppContextProvider>
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment