wonday / react-native-pdf

A <Pdf /> component for react-native
MIT License
1.58k stars 544 forks source link

ViewPropTypes is no longer available in react native its imported from 'deprecated-react-native-prop-types' #669

Open Hassan-jr opened 2 years ago

Hassan-jr commented 2 years ago

importing ViewPropTypes is causing errors because of depreciated importation form react native instead of deprecated-react-native-prop-types

this is the old way and its depreciated import {ViewPropTypes} from "react-native"

This is the new way import {ViewPropTypes} from 'deprecated-react-native-prop-types'

Please Update

garkuwa commented 2 years ago

@Hassan-jr there was a PR to fix this issue https://github.com/wonday/react-native-pdf/pull/650 It has been merged, but the problem is that the library version hasn't been popped up. For the time being, you might use the following in your package.json "react-native-pdf": "https://github.com/wonday/react-native-pdf.git"

But the question is still open. Who's gonna pop up the lib version?

ardhendu12345 commented 2 years ago

i solved it by adding the library deprecated-react-native-prop-types and with in the node_module/react-native-pdf all the ViewPropTypes are taken from react-native core ..remove them and then use import {ViewPropTypes} from 'deprecated-react-native-prop-types' with all the files ...it solve in my case...

UNIDY2002 commented 2 years ago

Looking forward to a new release with PR #650 merged :heart:

UNIDY2002 commented 2 years ago

It seems that the problem is solved. Great thanks!