Skip to content

Instantly share code, notes, and snippets.

@danyaljj
Created June 25, 2015 23:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save danyaljj/e746344c4ed079896d4c to your computer and use it in GitHub Desktop.
Save danyaljj/e746344c4ed079896d4c to your computer and use it in GitHub Desktop.
A simple table with inline styling: https://jsfiddle.net/danyaljj/ud5p4yo0/
var style = {
backgroundColor: 'red',
}
var Hello = React.createClass({
render: function() {
//return <div>Hello {this.props.name}</div>;
return (
<table>
<tr>
<th style={style}>Month</th>
<th>Savings</th>
</tr>
<tr>
<td>January</td>
<td>$100</td>
</tr>
<tr>
<td>February</td>
<td>$80</td>
</tr>
</table>
);
}
});
React.render(<Hello name="World" />, document.getElementById('container'));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment