From c293f29f57fc100185a33b21f7e5c318363c9e79 Mon Sep 17 00:00:00 2001 From: yushimatenjin Date: Wed, 28 Nov 2018 12:47:40 -0800 Subject: [PATCH] Fix rename legacy component lifecycles (#22125) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- RNTester/js/ImageEditingExample.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/RNTester/js/ImageEditingExample.js b/RNTester/js/ImageEditingExample.js index af22c3034..c62784acb 100644 --- a/RNTester/js/ImageEditingExample.js +++ b/RNTester/js/ImageEditingExample.js @@ -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;