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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

react native 0.7 fixes, removed the proptypes import which are now not allowed #118

Open
shrynshjn opened this issue Oct 12, 2022 · 0 comments

Comments

@shrynshjn
Copy link

Hi! 馃憢

Firstly, thanks for your work on this project! 馃檪

Today I used patch-package to patch [email protected] for the project I'm working on.

Here is the diff that solved my problem:

diff --git a/node_modules/react-native-easy-toast/index.js b/node_modules/react-native-easy-toast/index.js
index d30971e..09a9503 100755
--- a/node_modules/react-native-easy-toast/index.js
+++ b/node_modules/react-native-easy-toast/index.js
@@ -14,11 +14,10 @@ import {
     Dimensions,
     Text,
     TouchableWithoutFeedback,
-    ViewPropTypes as RNViewPropTypes,
 } from 'react-native'
 
 import PropTypes from 'prop-types';
-const ViewPropTypes = RNViewPropTypes || View.propTypes;
+const ViewPropTypes =  View.propTypes;
 export const DURATION = {
     LENGTH_SHORT: 500,
     FOREVER: 0,
@@ -147,13 +146,11 @@ const styles = StyleSheet.create({
 });
 
 Toast.propTypes = {
-    style: ViewPropTypes.style,
     position: PropTypes.oneOf([
         'top',
         'center',
         'bottom',
     ]),
-    textStyle: Text.propTypes.style,
     positionValue:PropTypes.number,
     fadeInDuration:PropTypes.number,
     fadeOutDuration:PropTypes.number,

This issue body was partially generated by patch-package.

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