React: PropTypes in stateless functional component React: PropTypes in stateless functional component reactjs reactjs

React: PropTypes in stateless functional component


You should change the casing on the property to propTypes:

- List.PropTypes = {+ List.propTypes = {    todos: PropTypes.array.isRequired,  };

Correct:

List.propTypes = {  todos: PropTypes.array.isRequired,};

(The instance of a PropTypes object is lowercase, but the Class/Type is uppercase. The instance is List.propTypes. The Class/Type is PropTypes.)