Skip to content

PropTypes.bool #50

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
RDMCharts opened this issue Nov 6, 2017 · 5 comments
Open

PropTypes.bool #50

RDMCharts opened this issue Nov 6, 2017 · 5 comments

Comments

@RDMCharts
Copy link

Hi guys,
I have been trying to get the multislider to work with my React Native project. However whenever I try to import the multislider I receive an error message, Undefined is not an object (evaluating 'PropTypes.bool') it only shows up when I have used: import MultiSlider from 'react-native-mulit-slider'; at the top of my project.

Any advice of what I am doing wrong would be amazing!

Thanks

@timorss
Copy link

timorss commented Nov 27, 2017

@RDMCharts
send the code please

@mickadoua
Copy link

same problem
only the import, crash the app,

import MultiSlider from "react-native-multi-slider";

package Version :

"react": "16.0.0", 
"react-native": 50.3

its maybe, proptype implementation
var { PropTypes } = React;
on mockProps.js and Slider.js files

@mickadoua
Copy link

@RDMCharts try to change on both files by

var PropTypes = require('prop-types');

@peterchibunna
Copy link

Changing the problematic statements resulted to a new error:
undefined is not a function (evaluating '_react3.default.createClass')
with a pointer to the line 12 of mockProps.js
var BasicMarker = React.createClass({

@atturnbull
Copy link

atturnbull commented Jan 17, 2018

Hey, figured out a fix. Do as above suggests, and additionally change every line of

var <className> = React.createClass({

to

var <className> = React.Component({

React.createClass() has been deprecated for a while now, I guess. Replacing it to just extend the React.Component class got me past this error. Hope it works for you too.

Edit: This being said, the upkeep on this repo is pretty dead. We may want to switch to https://github.com/ptomasroos/react-native-multi-slider , who seems to be updating more regularly

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants