Remove componentWillReceiveProps usages in examples#1952
Remove componentWillReceiveProps usages in examples#1952seadeep42 wants to merge 5 commits intofacebookarchive:masterfrom seadeep42:fix/deprecated_react_lifecycle_methods
Conversation
|
Hi @Chaitanya-Deep, welcome to Draft.js and thanks for taking the time to look into this issue! This change looks good to me 👍🏼, sounds good to remove the sketchy |
|
|
||
| componentWillReceiveProps(nextProps) { | ||
| if (nextProps.content !== this.props.content) { | ||
| componentDidUpdate(prevProps) { |
There was a problem hiding this comment.
Maybe worth calling out there's an unused prevState second argument here.
There was a problem hiding this comment.
Made the change but is that necessary?
The third snapshot argument is also unused.
And the docs for typical usage of componentDidUpdate don't include it either
https://reactjs.org/docs/react-component.html#componentdidupdate
facebook-github-bot
left a comment
There was a problem hiding this comment.
@claudiopro is landing this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
…x/deprecated_react_lifecycle_methods
facebook-github-bot
left a comment
There was a problem hiding this comment.
@niveditc has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
niveditc
left a comment
There was a problem hiding this comment.
Thanks for working on this! Requesting changes to split the gulp native update into a separate PR.
facebook-github-bot
left a comment
There was a problem hiding this comment.
@niveditc has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
…1952) Summary: **Summary** Resolves [1940](facebookarchive#1940) Change usage of `componentWillReceiveProps` in Tex examples to `componentDidUpdate` Pull Request resolved: facebookarchive#1952 Reviewed By: claudiopro Differential Revision: D13417818 Pulled By: claudiopro fbshipit-source-id: b13ff3140c3207cddaeb8d98c239f7dfd4b04a47
Summary: **Summary** Resolves [1940](facebookarchive/draft-js#1940) Change usage of `componentWillReceiveProps` in Tex examples to `componentDidUpdate` Pull Request resolved: facebookarchive/draft-js#1952 Reviewed By: claudiopro Differential Revision: D13417818 Pulled By: claudiopro fbshipit-source-id: b13ff3140c3207cddaeb8d98c239f7dfd4b04a47
Summary: **Summary** Resolves [1940](facebookarchive/draft-js#1940) Change usage of `componentWillReceiveProps` in Tex examples to `componentDidUpdate` Pull Request resolved: facebookarchive/draft-js#1952 Reviewed By: claudiopro Differential Revision: D13417818 Pulled By: claudiopro fbshipit-source-id: b13ff3140c3207cddaeb8d98c239f7dfd4b04a47
Summary
Resolves 1940
Change usage of
componentWillReceivePropsin Tex examples tocomponentDidUpdate