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

React 16.3+ compatibility: replace componentWillReceiveProps with componentDidUpdate #141

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

simmerer
Copy link

Replacement looks to be straightforward.

@@ -73,7 +73,7 @@ module.exports = class Reader extends Component {
this.initiateLegacyMode()
}
}
componentWillReceiveProps(nextProps) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's not just about renaming the lifecycles method, and also, componentWillReceivePros is replaced by getDerivedStateFromProps, not componentDidUpdate

@simmerer simmerer closed this Nov 8, 2019
@Indigo744
Copy link

Why was this closed?

Even if not the best approach, the fix would work and remove any warning message.

Please consider reopening and merging.

@PeterTheOne
Copy link

Btw. https://github.com/kybarg/react-qr-scanner works with react 16.3+

@flefloch-payps
Copy link

Btw. https://github.com/kybarg/react-qr-scanner works with react 16.3+

But it doesn't seem to work fine on MacOs / iOS.
Any news about accepting this PR?

@iamgutz
Copy link

iamgutz commented Dec 14, 2020

Hey guys any plans on merging this or fixing the componentWillReceiveProps deprecation warning? Seems like it still there.

@kadriev-ilyas
Copy link

Hello,
I also ask you to solve this problem. Thank you in advance

@FlorianFlatscher
Copy link

same here

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

Successfully merging this pull request may close these issues.

None yet

8 participants