Last active
October 27, 2018 22:27
-
-
Save gujc71/c2e2b7e02a8decbe336287731d73cc8b to your computer and use it in GitHub Desktop.
react_board
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, { Component } from 'react'; | |
class App extends Component { | |
state = { | |
boards: [ | |
{ | |
brdno: 1, | |
brdwriter: 'Lee SunSin', | |
brdtitle: 'If you intend to live then you die', | |
brddate: new Date() | |
}, | |
{ | |
brdno: 2, | |
brdwriter: 'So SiNo', | |
brdtitle: 'Founder for two countries', | |
brddate: new Date() | |
} | |
] | |
} | |
render() { | |
const { boards } = this.state; | |
const list = boards.map(function(row){ | |
return row.brdno + row.brdwriter ; | |
}); | |
return ( | |
<div> | |
{list} | |
</div> | |
); | |
} | |
} | |
export default App; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment