Skip to content

Commit

Permalink
Fix rename legacy component lifecycles (#22125)
Browse files Browse the repository at this point in the history
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: facebook/react-native#22125

Differential Revision: D13237831

Pulled By: mmmulani

fbshipit-source-id: b4ca1e4628f93e89fd5680c40b0e3f7c7db6ad38
  • Loading branch information
yushimatenjin authored and facebook-github-bot committed Nov 28, 2018
1 parent 797b589 commit b4a3150
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion js/ImageEditingExample.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit b4a3150

Please sign in to comment.