Skip to content

Instantly share code, notes, and snippets.

@thehappybug
Created June 15, 2018 19:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save thehappybug/9274ae30195bdeb725893cdbf18d605d to your computer and use it in GitHub Desktop.
Save thehappybug/9274ae30195bdeb725893cdbf18d605d to your computer and use it in GitHub Desktop.
import * as React from "react";
import { AppContextInterface, withAppContext } from "./AppContext";
const PostInfoComp = ({ appContext }: { appContext?: AppContextInterface }) =>
appContext && (
<div>
Name: {appContext.name} <br />
Author: {appContext.author} <br />
Url: {appContext.url}
</div>
);
export const PostInfo = withAppContext(PostInfoComp);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment