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

Fix for RN 0.69 (remove prop types) #94

Open
JB-CHAUVIN opened this issue Jul 25, 2022 · 1 comment
Open

Fix for RN 0.69 (remove prop types) #94

JB-CHAUVIN opened this issue Jul 25, 2022 · 1 comment

Comments

@JB-CHAUVIN
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-smooth-pincode-input/src/index.js b/node_modules/react-native-smooth-pincode-input/src/index.js
index 5ca58d4..fffbd53 100644
--- a/node_modules/react-native-smooth-pincode-input/src/index.js
+++ b/node_modules/react-native-smooth-pincode-input/src/index.js
@@ -237,47 +237,4 @@ class SmoothPinCodeInput extends Component {
   };
 }
 
-SmoothPinCodeInput.propTypes = {
-  value: PropTypes.string,
-  codeLength: PropTypes.number,
-  cellSize: PropTypes.number,
-  cellSpacing: PropTypes.number,
-
-  placeholder: PropTypes.oneOfType([
-    PropTypes.string,
-    PropTypes.element,
-  ]),
-  mask: PropTypes.oneOfType([
-    PropTypes.string,
-    PropTypes.element,
-  ]),
-  maskDelay: PropTypes.number,
-  password: PropTypes.bool,
-
-  autoFocus: PropTypes.bool,
-
-  restrictToNumbers: PropTypes.bool,
-
-  containerStyle: ViewPropTypes.style,
-
-  cellStyle: ViewPropTypes.style,
-  cellStyleFocused: ViewPropTypes.style,
-
-  textStyle: Text.propTypes.style,
-  textStyleFocused: Text.propTypes.style,
-
-  animationFocused: PropTypes.oneOfType([
-    PropTypes.string,
-    PropTypes.object,
-  ]),
-
-  onFulfill: PropTypes.func,
-  onChangeText: PropTypes.func,
-  onBackspace: PropTypes.func,
-
-  keyboardType: PropTypes.string,
-  editable: PropTypes.bool,
-  inputProps: PropTypes.exact(TextInput.propTypes),
-};
-
 export default SmoothPinCodeInput;

This issue body was partially generated by patch-package.

@gerynugrh
Copy link

Hi @JB-CHAUVIN may I know why you choose this direction instead of importing ViewPropTypes from deprecated-react-native-prop-types 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

2 participants