Skip to content

Instantly share code, notes, and snippets.

@amandeepmittal
Created May 9, 2019 10:01
Show Gist options
  • Save amandeepmittal/5050e932e57445915cce5b45d1f8386e to your computer and use it in GitHub Desktop.
Save amandeepmittal/5050e932e57445915cce5b45d1f8386e to your computer and use it in GitHub Desktop.
// 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