Last active
October 28, 2019 07:48
-
-
Save buglessir/374133e6feba2b5eed86cdb0c9efeb76 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, { createContext } from 'react'; | |
import Profile from './components/Profile'; | |
const UserData = { | |
name: 'Mohammad Esmaeilzadeh', | |
title: 'Front-end Developer', | |
url: 'https://virgool.io/@buglessir' | |
}; | |
export const UserContext = createContext(); | |
class User extends React.Component { | |
render() { | |
return ( | |
<UserContext.Provider value={UserData}> | |
<Profile/> | |
</UserContext.Provider> | |
); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment