From 3e229f27bc9c7556876ff776abf70147289d544b Mon Sep 17 00:00:00 2001 From: Tim Yung Date: Tue, 1 Feb 2022 16:17:34 -0800 Subject: [PATCH] RN: Remove `propTypes` from Image, Text, and TextInput Summary: Removes the `propTypes` member from the `Image`, `Text`, and `TextInput` components. They have been deprecated since React Native v0.66. Changelog: [General][Removed] - Removed `Image.propTypes`, `Text.propTypes`, and `TextInput.propTypes`. Reviewed By: kacieb Differential Revision: D33750298 fbshipit-source-id: 085f83ad838196bdd531b097b8ce5957270c3ad1 --- BUCK | 1 - Libraries/Components/TextInput/TextInput.js | 7 ------- Libraries/Image/Image.android.js | 6 ------ Libraries/Image/Image.ios.js | 6 ------ Libraries/Text/Text.js | 6 ------ 5 files changed, 26 deletions(-) diff --git a/BUCK b/BUCK index b9d639adff92ee..c07b0f5d1c7455 100644 --- a/BUCK +++ b/BUCK @@ -723,7 +723,6 @@ rn_library( "//xplat/js:node_modules__abort_19controller", "//xplat/js:node_modules__anser", "//xplat/js:node_modules__base64_19js", - "//xplat/js:node_modules__deprecated_19react_19native_19prop_19types", "//xplat/js:node_modules__event_19target_19shim", "//xplat/js:node_modules__invariant", "//xplat/js:node_modules__nullthrows", diff --git a/Libraries/Components/TextInput/TextInput.js b/Libraries/Components/TextInput/TextInput.js index d5d167d61e2969..53f8c5b9772c21 100644 --- a/Libraries/Components/TextInput/TextInput.js +++ b/Libraries/Components/TextInput/TextInput.js @@ -1341,13 +1341,6 @@ const ExportedForwardRef: React.AbstractComponent< ); }); -/** - * Switch to `deprecated-react-native-prop-types` for compatibility with future - * releases. This is deprecated and will be removed in the future. - */ -ExportedForwardRef.propTypes = - require('deprecated-react-native-prop-types').TextInputPropTypes; - // $FlowFixMe[prop-missing] ExportedForwardRef.State = { currentlyFocusedInput: TextInputState.currentlyFocusedInput, diff --git a/Libraries/Image/Image.android.js b/Libraries/Image/Image.android.js index 2dd43e4dfb77ba..bce71527175924 100644 --- a/Libraries/Image/Image.android.js +++ b/Libraries/Image/Image.android.js @@ -306,12 +306,6 @@ Image.queryCache = queryCache; * comment and run Flow. */ Image.resolveAssetSource = resolveAssetSource; -/** - * Switch to `deprecated-react-native-prop-types` for compatibility with future - * releases. This is deprecated and will be removed in the future. - */ -Image.propTypes = require('deprecated-react-native-prop-types').ImagePropTypes; - const styles = StyleSheet.create({ base: { overflow: 'hidden', diff --git a/Libraries/Image/Image.ios.js b/Libraries/Image/Image.ios.js index 652017ec4986d7..deb54281ef21bf 100644 --- a/Libraries/Image/Image.ios.js +++ b/Libraries/Image/Image.ios.js @@ -232,12 +232,6 @@ Image.queryCache = queryCache; * delete this comment and run Flow. */ Image.resolveAssetSource = resolveAssetSource; -/** - * Switch to `deprecated-react-native-prop-types` for compatibility with future - * releases. This is deprecated and will be removed in the future. - */ -Image.propTypes = require('deprecated-react-native-prop-types').ImagePropTypes; - const styles = StyleSheet.create({ base: { overflow: 'hidden', diff --git a/Libraries/Text/Text.js b/Libraries/Text/Text.js index 35db91d2bdc82f..7e0d5734929651 100644 --- a/Libraries/Text/Text.js +++ b/Libraries/Text/Text.js @@ -189,12 +189,6 @@ const Text: React.AbstractComponent< Text.displayName = 'Text'; -/** - * Switch to `deprecated-react-native-prop-types` for compatibility with future - * releases. This is deprecated and will be removed in the future. - */ -Text.propTypes = require('deprecated-react-native-prop-types').TextPropTypes; - /** * Returns false until the first time `newValue` is true, after which this will * always return true. This is necessary to lazily initialize `Pressability` so