PropTypes React not working


Hi everyone

I just starting to learn meteor with react, but PropTypes not working for me
in console log i get this message Uncaught TypeError: Cannot read property ‘array’ of undefined

I import import React, { Component, PropTypes } from ‘react’; so anyone can help me and thanks


Try importing PropTypes from a separate package, newest versions of React doesn’t include PropTypes, so you have to use it separately.


As Nick mentioned, importing PropType from the react package directly has been deprecated in React 16. Use prop-types npm package instead.

Which version of react are you using?