react-native-modal-popover icon indicating copy to clipboard operation
react-native-modal-popover copied to clipboard

componentWillReceiveProps deprecation warning

Open big-toni opened this issue 5 years ago • 1 comments

old lifecycle method is used:

Popover.prototype.componentWillReceiveProps = function (nextProps) { var _this = this; var willBeVisible = nextProps.visible; var _a = this.props, visible = _a.visible, fromRect = _a.fromRect, displayArea = _a.displayArea; if (willBeVisible !== visible) { if (willBeVisible) { this.setState({ contentSize: { width: 0, height: 0 }, isAwaitingShow: true, visible: true }); } else { this.startAnimation(false); } } else if (willBeVisible && (fromRect !== nextProps.fromRect || displayArea !== nextProps.displayArea)) { var geom = this.computeGeometry(nextProps, this.state.contentSize); var isAwaitingShow_2 = this.state.isAwaitingShow; this.setState(__assign({}, geom), function () { if (isAwaitingShow_2) { _this.startAnimation(true); } }); } };

This should be changed to componentDidUpdate

big-toni avatar Nov 12 '19 11:11 big-toni

Any news on this issue? thank you in advance

nicoferreyra avatar Dec 26 '19 19:12 nicoferreyra