Skip to content

Instantly share code, notes, and snippets.

@maecapozzi
Last active August 16, 2018 15:25
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 maecapozzi/caef7d9da5d85c3eeef0509d11149d91 to your computer and use it in GitHub Desktop.
Save maecapozzi/caef7d9da5d85c3eeef0509d11149d91 to your computer and use it in GitHub Desktop.
const Child = () => {
// Family Consumer uses the
// Function as a Child pattern
return <FamilyConsumer>
// context is the object with lastName
// on it. It gets passed as an argument
{context => <p>{context}</p>}
</FamilyConsumer>;
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment