Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save azamsharp/d45bc40e6bb24f573680d0c4b7a12bb4 to your computer and use it in GitHub Desktop.
Save azamsharp/d45bc40e6bb24f573680d0c4b7a12bb4 to your computer and use it in GitHub Desktop.
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
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