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 removed from react-native error #117

Open
gtzippy opened this issue Jun 28, 2022 · 2 comments
Open

ViewPropTypes has been removed from react-native error #117

gtzippy opened this issue Jun 28, 2022 · 2 comments

Comments

@gtzippy
Copy link

gtzippy commented Jun 28, 2022

The most recent release of react-native has build error switch easy-toast and shows a message like this:

ERROR Invariant Violation: ViewPropTypes has been removed from React Native. Migrate to ViewPropTypes exported from 'deprecated-react-native-prop-types'.

Has anyone else seen this running react-native 0.69.0?

Edit: I thought I had a workaround. I did not. Any ideas on this?

@laurens-lamberts
Copy link

Hi @gtzippy,
I got it working with a few changes to the module.
This should help you out;

  1. Install deprecated-react-native-prop-types to your own project
  2. Change the file extension of the attached file below to .patch, and move it to a patches folder in the root of your project. If you're already using patch-package, a simple yarn install (or npm install) should do the trick. Otherwise, I recommend installing it as instructed here; https://github.com/ds300/patch-package

react-native-easy-toast+2.0.0.txt

@Base2526
Copy link

Base2526 commented Oct 21, 2022

Hi, @gtzippy
you can git clone custom package & modify react-native-easy-toast
step

  1. Install deprecated-react-native-prop-types to your own projec
  2. clone react-native-easy-toast at path custom
  3. npm i --save ./path/xxxx/react-native-easy-toast
  4. modify follow @laurens-lamberts react-native-easy-toast+2.0.0.txt
  5. import Toast, {DURATION} from ' ./path/xxxx/react-native-easy-toast'
  6. enjoy

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