react-native-circular-slider
react-native-circular-slider copied to clipboard
Undefined is not an object (evaluating '_react2.PropTypes.number')
When I am running my app I am after adding circular slider getting this error
You have to add PropTypes library and import then into the files. React recently put prop-types into its own package.
Can you explain what you mean by this @JohnCoronel, I'm also getting this error and not really sure where to go from here.
@danstans see https://github.com/bartgryszko/react-native-circular-slider/pull/21. You can edit the src files and update the imports so propTypes is included
still not solved
I fixed it by getting the package using yarn add prop-types --dev
and then editing the src files CircularSlider.js
and ClockFace.js
to use import PropTypes from 'prop-types';
instead of the React imported PropTypes because they deprecated it in the newer releases. Hope this helps and I will make a PR to merge this in.
Thanks Afshawn
can this slider be used while developing app using expo? if yes then how? because I'm facing this error https://github.com/bartgryszko/react-native-circular-slider/issues/46