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

ViewPropTypes has been deprecated in React Native #244

Closed
vitalyiegorov opened this issue May 19, 2020 · 6 comments
Closed

ViewPropTypes has been deprecated in React Native #244

vitalyiegorov opened this issue May 19, 2020 · 6 comments

Comments

@vitalyiegorov
Copy link

vitalyiegorov commented May 19, 2020

Using React Native 0.62.2
PropTypes has been deprecated and will be removed react-native-community/discussions-and-proposals#29

We are using this package with React native web and after 0.12 release it throws an error:
node_modules/react-native-circular-progress/src/CircularProgress.js Attempted import error: 'ViewPropTypes' is not exported from 'react-native-web/dist/index'.

As they have already removed the PropTypes from their exports.

a possible npm script fix:
"fix:react-native-circular-progress": "sed -e \"s/ViewPropTypes.style,/PropTypes.object,/g\" -i.bak ./node_modules/react-native-circular-progress/src/CircularProgress.js",

@aboveyunhai
Copy link
Contributor

since ViewPropTypes is only for runtime checking, simply removing it from CircularProgress.js is my best bet if you don't want to execute the script every time.

@markusl
Copy link
Collaborator

markusl commented Jun 15, 2020

@vitalyiegorov you can also provide a pull request to get this quickly fixed :)

bwalsh added a commit to bwalsh/react-native-circular-progress that referenced this issue Jul 1, 2020
Replaces ViewPropTypes.style with PropTypes.object
Addresses bartgryszko#244
bwalsh added a commit to bwalsh/react-native-circular-progress that referenced this issue Jul 1, 2020
replaces ViewPropTypes.style with PropTypes.object
addresses bartgryszko#244
@markusl
Copy link
Collaborator

markusl commented Aug 2, 2020

I believe this is now resolved.

@markusl markusl closed this as completed Aug 2, 2020
@lavor
Copy link

lavor commented Nov 11, 2020

@markusl Could you release the new version with this fix, please?

@Stoneski93
Copy link

Stoneski93 commented Dec 3, 2020

@lavor To work it on react-native-web you need also https://github.com/bakerface/react-native-svg-web
@markusl When that fix will be release?

In CircuralProgress still got something like that for version 1.3.6
image

@hotchpotch
Copy link

#247 it works well on my project.
Could you please the new version 🙏

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

6 participants