Skip to content

Instantly share code, notes, and snippets.

@matheusml
Last active February 11, 2021 19:16
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 matheusml/2e6b417fbc8ce086d04b833a1407c7a8 to your computer and use it in GitHub Desktop.
Save matheusml/2e6b417fbc8ce086d04b833a1407c7a8 to your computer and use it in GitHub Desktop.
import React, { Fragment } from 'react';
const user = {
email: 'my@email.com',
};
export const UserContext = React.createContext();
function App() {
return (
<UserContext.Provider value={user}>
<Fragment>
<Header />
<Main />
<Footer />
</Fragment>
</UserContext>
);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment