Skip to content
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

Broken since PropTypes moved #23

Open
jcush opened this issue Jan 16, 2020 · 1 comment
Open

Broken since PropTypes moved #23

jcush opened this issue Jan 16, 2020 · 1 comment

Comments

@jcush
Copy link

jcush commented Jan 16, 2020

Since PropTypes moved to their own library (React 15.5, not sure of the exact version of RN when this happened) the component doesn't work, since it throws an error about undefined values whenever something within React.PropTypes.* is used.

The fix is to use the following in any file where PropTypes is used:

import PropTypes from 'prop-types';

Then replace any declaration of React.PropTypes with PropTypes

This error is initially thrown in /src/switch.js so it definitely needs fixing there first

@jcush
Copy link
Author

jcush commented Jan 16, 2020

I've since seen your code in this repo has implemented the changes mentioned above, but these aren't reflected in npm...

Having run npm view react-native-customisable-switch versions I can see only 0.1.0 is available, which is the version that is downloading... @baderahmed can you please publish a newer version with this fix?

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

1 participant