Skip to content

Commit

Permalink
RN: Remove propTypes from Image, Text, and TextInput
Browse files Browse the repository at this point in the history
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
  • Loading branch information
yungsters authored and facebook-github-bot committed Feb 2, 2022
1 parent cb42049 commit 3e229f2
Show file tree
Hide file tree
Showing 5 changed files with 0 additions and 26 deletions.
1 change: 0 additions & 1 deletion BUCK
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
7 changes: 0 additions & 7 deletions Libraries/Components/TextInput/TextInput.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
6 changes: 0 additions & 6 deletions Libraries/Image/Image.android.js
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
6 changes: 0 additions & 6 deletions Libraries/Image/Image.ios.js
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
6 changes: 0 additions & 6 deletions Libraries/Text/Text.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 3e229f2

Please sign in to comment.