Skip to content

Instantly share code, notes, and snippets.

@gujc71
Last active October 27, 2018 22:27
Show Gist options
  • Save gujc71/c2e2b7e02a8decbe336287731d73cc8b to your computer and use it in GitHub Desktop.
Save gujc71/c2e2b7e02a8decbe336287731d73cc8b to your computer and use it in GitHub Desktop.
react_board
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