Skip to content

Undefined proptypes #105

Description

@raazatul7

Hi! 👋

Firstly, thanks for your work on this project! 🙂

Today I used patch-package to patch react-native-confirmation-code-input@1.0.4 for the project I'm working on.

Here is the diff that solved my problem:

diff --git a/node_modules/react-native-confirmation-code-input/components/ConfirmationCodeInput.js b/node_modules/react-native-confirmation-code-input/components/ConfirmationCodeInput.js
index 239c85a..a76a0d5 100644
--- a/node_modules/react-native-confirmation-code-input/components/ConfirmationCodeInput.js
+++ b/node_modules/react-native-confirmation-code-input/components/ConfirmationCodeInput.js
@@ -1,10 +1,15 @@
 import React, {Component} from 'react';
 import PropTypes from 'prop-types';
-import { View, TextInput, StyleSheet, Dimensions, ViewPropTypes } from 'react-native';
+import { View, TextInput, StyleSheet } from 'react-native';
 import _ from 'lodash';
+import {
+  ViewPropTypes,
+  TextInputPropTypes,
+} from "deprecated-react-native-prop-types";
 
 // if ViewPropTypes is not defined fall back to View.propType (to support RN < 0.44)
 const viewPropTypes = ViewPropTypes || View.propTypes;
+const textInputPropTypes = TextInputPropTypes || TextInput.propTypes;
 
 export default class ConfirmationCodeInput extends Component {
   static propTypes = {
@@ -19,7 +24,7 @@ export default class ConfirmationCodeInput extends Component {
     inactiveColor: PropTypes.string,
     ignoreCase: PropTypes.bool,
     autoFocus: PropTypes.bool,
-    codeInputStyle: TextInput.propTypes.style,
+    codeInputStyle: textInputPropTypes.style,
     containerStyle: viewPropTypes.style,
     onFulfill: PropTypes.func,
   };

This issue body was partially generated by patch-package.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions