-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
refactor: use object refs instead of deprecated string refs #1866
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
refactor: use object refs instead of deprecated string refs #1866
Conversation
Thanks for opening this pull request!
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good! Another modernization step into the future!
@visualfanatic I thought you requested a review for this PR, but I just saw you didn't, was this ready for merge? It worked fine for me locally. |
@mtrezza no worries, it was ready 👍 |
🎉 This pull request has been released in version 3.3.0-alpha.6 |
🎉 This change has been released in version 3.3.0-beta.1 |
🎉 This change has been released in version 3.3.0 |
New Pull Request Checklist
Issue Description
String refs are deprecated and React team will be removing them at some point in the future. This PR refactors them into object refs using
createRef
.Related issue: #1866
Approach
React.createRef
,this.refs
object with class properties,ReactDOM.findDOMNode
for refs as they are unnecessary, as the ref already points to a DOM node,TODOs before merging