Created
June 8, 2020 14:48
-
-
Save azamsharp/d45bc40e6bb24f573680d0c4b7a12bb4 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 from 'react' | |
import { Component } from "react"; | |
import Menu from './components/Menu'; | |
import Post from './components/Post' | |
class App extends Component { | |
// render is used to display html on the screen | |
// JSX = JavaScript and XML | |
render() { | |
return ( | |
<div> | |
<Menu /> | |
<Post /> | |
<Post /> | |
<Post /> | |
<Post /> | |
</div> | |
) | |
} | |
} | |
export default App | |
// Create an app which has Name component and it displays your name. Put the Name component inside the App component and show it on the screen |
This file contains hidden or 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, { Component } from 'react' | |
class Post extends Component { | |
render() { | |
return ( | |
<h1>This is my first post</h1> | |
) | |
} | |
} | |
export default Post |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment