Skip to content

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

Merged
merged 1 commit into from
Oct 15, 2021

Conversation

damianstasik
Copy link
Contributor

@damianstasik damianstasik commented Oct 15, 2021

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

  • Initialize empty refs in components' constructors using React.createRef,
  • Replace this.refs object with class properties,
  • Remove ReactDOM.findDOMNode for refs as they are unnecessary, as the ref already points to a DOM node,
  • Replace string refs with references to the class properties

TODOs before merging

  • A changelog entry is created automatically using the pull request title (do not manually add a changelog entry)

@parse-github-assistant
Copy link

parse-github-assistant bot commented Oct 15, 2021

Thanks for opening this pull request!

  • 🎉 We are excited about your hands-on contribution!

Copy link
Member

@mtrezza mtrezza left a 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!

@mtrezza mtrezza merged commit 3bc8eec into parse-community:alpha Oct 15, 2021
@mtrezza
Copy link
Member

mtrezza commented Oct 15, 2021

@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.

@damianstasik
Copy link
Contributor Author

@mtrezza no worries, it was ready 👍

@parseplatformorg
Copy link
Contributor

🎉 This pull request has been released in version 3.3.0-alpha.6

@parseplatformorg
Copy link
Contributor

🎉 This change has been released in version 3.3.0-beta.1

@parseplatformorg parseplatformorg added the state:released-beta Released as beta version label Nov 1, 2021
@parseplatformorg
Copy link
Contributor

🎉 This change has been released in version 3.3.0

@parseplatformorg parseplatformorg added the state:released Released as stable version label Jan 1, 2022
damianstasik pushed a commit to damianstasik/parse-dashboard that referenced this pull request Jan 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
state:released Released as stable version state:released-alpha Released as alpha version state:released-beta Released as beta version
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants