PropTypes

export class BestSeller extends React.Component {
  render() {
    return (
      <li>
        Title: <span>
          {this.props.title}
        </span><br />
        
        Author: <span>
          {this.props.author}
        </span><br />
        
        Weeks: <span>
          {this.props.weeksOnList}
        </span>
      </li>
    );
  }
}

BestSeller.propTypes = {
  title:        React.PropTypes.string.isRequired,
  author:       React.PropTypes.string.isRequired,
  weeksOnList:  React.PropTypes.number.isRequired
}

forms

export class Input extends React.Component {
  constructor(props){
    super(props)
    this.state = {userInput: ''}
    this.handleUserInput = this.handleUserInput.bind(this)
  }
  // la fonction qui gère l'événement onchange, et le refresh du state
  handleUserInput(e){
    this.setState({userInput: e.target.value})
  }
  
  render() {
    return (
      <div>
        <input type="text" onChange={this.handleUserInput} value={this.state.userInput}/>
        <h1>{this.state.userInput}</h1>
      </div>
    );
  }
}

controlled/uncontroled

uncontrolled component remembers its state