123456789101112131415161718192021 |
- var X = React.createClass({
- render: function() {
- var c = this.map(c => <Comment comment={c} key={c.id} />);
- return (
- <div className='comments'>
- {c}
- </div>
- );
- },
- foo: function() {}
- });
- var Comment = React.createClass({
- render: function() {
- var comment = this.props.comment;
- return (
- <li>{comment}</li>
- );
- }
- foo: function() {}
- });
|