Fix rename legacy component lifecycles (#22125)

Summary:
Adding an “UNSAFE_” prefix to `componentWillMount`.

If this PR fixes an issue, type "Fixes #issueNumber" to automatically close the issue when the PR is merged.

- [x] yarn test
- [x] yarn flow
- [x] yarn flow-check-ios
- [x] yarn flow-check-android

[General] [Fixed] - adding an UNSAFE_ prefix
Pull Request resolved: https://github.com/facebook/react-native/pull/22125

Differential Revision: D13237831

Pulled By: mmmulani

fbshipit-source-id: b4ca1e4628f93e89fd5680c40b0e3f7c7db6ad38
This commit is contained in:
yushimatenjin 2018-11-28 12:47:40 -08:00 committed by Facebook Github Bot
parent e81adb99f3
commit c293f29f57

View File

@ -184,7 +184,7 @@ class ImageCropper extends React.Component<$FlowFixMeProps, $FlowFixMeState> {
_scaledImageSize: ImageSize;
_horizontal: boolean;
componentWillMount() {
UNSAFE_componentWillMount() {
// Scale an image to the minimum size that is large enough to completely
// fill the crop box.
const widthRatio = this.props.image.width / this.props.size.width;