<div id="root"></div>
class OneWayComponent extends React.Component {
  constructor() {
    super()
    this.state = { name: 'Bruce' }
  }
  change(event) {
    this.setState({ name: event.target.value });
  }
  render() {
    return (
      <div>
        <input value={ this.state.name } onChange={ (event)=> this.change(event) } />
        <p>Hello { this.state.name }!</p>
      </div>
    );
  }
}

var root = document.querySelector('#root');
ReactDOM.render(<OneWayComponent />, root)
View Compiled

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

  1. https://cdnjs.cloudflare.com/ajax/libs/react/0.14.3/react-with-addons.js
  2. https://cdnjs.cloudflare.com/ajax/libs/react/0.14.3/react-dom.js