react-prop-types
react-prop-types copied to clipboard
Uncaught TypeError: Cannot read property 'all' of undefined
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}
import * as CustomPropTypes from 'react-prop-types';
or
import { all } from 'react-prop-types';