Skip to content

Undefined proptypesΒ #105

@raazatul7

Description

@raazatul7

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-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.

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