bartgryszko / react-native-circular-slider

React Native component for creating circular slider :radio_button:

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Undefined is not an object (evaluating '_react2.PropTypes.number')

iam1208 opened this issue · comments

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 #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
#46