Author: Not specified Language: javascript
Description: Not specified Timestamp: 2018-05-10 11:16:51 +0000
View raw paste Reply
  1. const Today = () => (
  2.   <div>Today is {new Date().toDateString()}</div>
  3. );
  4. class HelloMessage extends React.Component {
  5.   render() {
  6.     return (
  7.       <React.Fragment>
  8.         <div>Hello {this.props.name}</div>
  9.         <Today />
  10.       </React.Fragment>
  11.     );
  12.   }
  13. }
  14. ReactDOM.render(
  15.   <HelloMessage name="Taylor" />,
  16.   mountNode
  17. );
View raw paste Reply