18 lines
		
	
	
		
			359 B
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
		
		
			
		
	
	
			18 lines
		
	
	
		
			359 B
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
| 
								 | 
							
								var HelloWorld = React.createClass({
							 | 
						||
| 
								 | 
							
								  render: function() {
							 | 
						||
| 
								 | 
							
								    return (
							 | 
						||
| 
								 | 
							
								      <p>
							 | 
						||
| 
								 | 
							
								        Hello, <input type="text" placeholder="Your name here" />!
							 | 
						||
| 
								 | 
							
								        It is {this.props.date.toTimeString()}
							 | 
						||
| 
								 | 
							
								      </p>
							 | 
						||
| 
								 | 
							
								    );
							 | 
						||
| 
								 | 
							
								  }
							 | 
						||
| 
								 | 
							
								});
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								setInterval(function() {
							 | 
						||
| 
								 | 
							
								  ReactDOM.render(
							 | 
						||
| 
								 | 
							
								    <HelloWorld date={new Date()} />,
							 | 
						||
| 
								 | 
							
								    document.getElementById('example')
							 | 
						||
| 
								 | 
							
								  );
							 | 
						||
| 
								 | 
							
								}, 500);
							 |