react-prop-types icon indicating copy to clipboard operation
react-prop-types copied to clipboard

Uncaught TypeError: Cannot read property 'all' of undefined

Open js8310 opened this issue 11 years ago • 1 comments

I'm trying to follow the example however, I got the error below.

import CustomPropTypes from 'react-prop-types';

propTypes: {
text: CustomPropTypes.all(...)
}

Error:

Uncaught TypeError: Cannot read property 'all' of undefined

Also, when I console.log(), the value of CustomPropTypes is undefined.

console.log({CustomPropTypes});
Object {CustomPropTypes: undefined}

js8310 avatar Nov 02 '15 17:11 js8310

import * as CustomPropTypes from 'react-prop-types';

or

import { all } from 'react-prop-types';

jquense avatar Nov 02 '15 17:11 jquense