Skip to content

Commit

Permalink
RN: Remove {Color,EdgeInsets,Point}PropType and ViewPropTypes
Browse files Browse the repository at this point in the history
Summary:
Removes `ColorPropType`, `EdgeInsetsPropType`, `PointPropType`, and `ViewPropTypes` from the React Native Public API.

Accessing these will now cause an error to be thrown with a message to use the `deprecated-react-native-prop-types` package.

These were deprecated in React Native v0.66.

Changelog:
[General][Removed] - Removed `ColorPropType`, `EdgeInsetsPropType`, `PointPropType`, and `ViewPropTypes`.

Reviewed By: kacieb

Differential Revision: D33746966

fbshipit-source-id: 61d264d133f42008c7ff252e6ebbb8b47747939c
  • Loading branch information
yungsters authored and facebook-github-bot committed Feb 1, 2022
1 parent 7b9490b commit 10199b1
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -446,32 +446,32 @@ module.exports = {
},
// Deprecated Prop Types
get ColorPropType(): $FlowFixMe {
console.warn(
'ColorPropType will be removed from React Native. Migrate to ' +
invariant(
false,
'ColorPropType has been removed from React Native. Migrate to ' +
"ColorPropType exported from 'deprecated-react-native-prop-types'.",
);
return require('deprecated-react-native-prop-types').ColorPropType;
},
get EdgeInsetsPropType(): $FlowFixMe {
console.warn(
'EdgeInsetsPropType will be removed from React Native. Migrate to ' +
invariant(
false,
'EdgeInsetsPropType has been removed from React Native. Migrate to ' +
"EdgeInsetsPropType exported from 'deprecated-react-native-prop-types'.",
);
return require('deprecated-react-native-prop-types').EdgeInsetsPropType;
},
get PointPropType(): $FlowFixMe {
console.warn(
'PointPropType will be removed from React Native. Migrate to ' +
invariant(
false,
'PointPropType has been removed from React Native. Migrate to ' +
"PointPropType exported from 'deprecated-react-native-prop-types'.",
);
return require('deprecated-react-native-prop-types').PointPropType;
},
get ViewPropTypes(): $FlowFixMe {
console.warn(
'ViewPropTypes will be removed from React Native. Migrate to ' +
invariant(
false,
'ViewPropTypes has been removed from React Native. Migrate to ' +
"ViewPropTypes exported from 'deprecated-react-native-prop-types'.",
);
return require('deprecated-react-native-prop-types').ViewPropTypes;
},
};

Expand Down

0 comments on commit 10199b1

Please sign in to comment.