Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

componentWillReceiveProps deprecation warning #39

Open
big-toni opened this issue Nov 12, 2019 · 1 comment
Open

componentWillReceiveProps deprecation warning #39

big-toni opened this issue Nov 12, 2019 · 1 comment

Comments

@big-toni
Copy link

big-toni commented Nov 12, 2019

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

@nicoferreyra
Copy link

Any news on this issue? thank you in advance

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants