Skip to content

Instantly share code, notes, and snippets.

@thehappybug
Last active June 15, 2018 16:14
Show Gist options
  • Select an option

  • Save thehappybug/3d44cd4d71d4270c07048628bd019efa to your computer and use it in GitHub Desktop.

Select an option

Save thehappybug/3d44cd4d71d4270c07048628bd019efa to your computer and use it in GitHub Desktop.
import * as React from 'react';
import { AppContextConsumer } from './AppContext';
export const PostInfo = () => (
<AppContextConsumer>
{appContext => appContext && (
<div>
Name: {appContext.name},
Author: {appContext.author},
Url: {appContext.url}
</div>
)}
</AppContextConsumer>
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment