-
-
Save amandeepmittal/5050e932e57445915cce5b45d1f8386e 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
// Posts.js | |
import React from "react" | |
import "../App.css" | |
class Posts extends React.Component { | |
state = { | |
posts: [ | |
{ id: 1, title: "Hello Blog World!" }, | |
{ id: 2, title: "My second post" }, | |
{ id: 3, title: "What is React Router?" } | |
] | |
} | |
render() { | |
return ( | |
<div className='posts'> | |
<h1>Posts List</h1> | |
</div> | |
) | |
} | |
} | |
export default Posts |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment