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

PropTypes imported via React/React-Native has been deprecated #182

Open
aliv1 opened this issue Dec 10, 2017 · 2 comments
Open

PropTypes imported via React/React-Native has been deprecated #182

aliv1 opened this issue Dec 10, 2017 · 2 comments

Comments

@aliv1
Copy link

aliv1 commented Dec 10, 2017

Needs to be imported via as the third party component prop-types.
import PropTypes from 'prop-types' Please update.

@DavitVosk
Copy link

I faced the same problem here. How can I fix the problem?

@vtam311
Copy link

vtam311 commented Dec 28, 2017

I was able to fix it. Here's what I did.

I forked the project and opened up the src files.

In each source file, whenever PropTypes was used, I changed how PropTypes was imported.

Before:
import { PropTypes } from 'react'

Now:
import PropTypes from 'prop-types';

The package uses the dist files in our project, so to update the dist files, do this in your fork.
npm install
npm run build.

Then push the changes to your fork on Github, and require your github repo instead of this repo in your project.

In package.json, add the line
"react-native-chart": "github:{YOUR_USERNAME}/react-native-chart",

uriklar pushed a commit to uriklar/react-native-chart that referenced this issue Apr 2, 2018
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

3 participants