import React from 'react';

class App extends React.Component {
  render() {
    return <Title text="The Text" />
  }
}

const Title = (props) =>
  <h1>Title: {props.text}</h1>

Title.propTypes = {
  text (props, propName, component) {
    if (!(propName in props)) {
      return new Error (`Missing ${propName}`);
    }
  }
}

export default App

import React from 'react';

class App extends React.Component {

  constructor () {
    super();
    this.state = {currentEvent: "---"}
    this.update = this.update.bind(this)
  }

  update (event) {
    this.setState({currentEvent: event.type})
  }

  render () {
    return (
      <div>
        <textArea
          onKeyPress={this.update}
          onCopy={this.update}
          onCut={this.update}
          onPaste={this.update}
          cols="30"
          rows="10"
        />
        <h1>{this.state.currentEvent}</h1>
      </div>
    )
  }

}

export default App

Normalize Events