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

The ReactDOM.findDOMNode deprecated. #455

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

cardosource
Copy link

Related Issue

The ReactDOM.findDOMNode method has been deprecated.
findDOMNode was developed for class components and has unpredictable behavior when it comes to functional components.

useRef and even React.createRef serve the same purpose and do not have vulnerabilities.

Proposed Changes

  • Remove all instances of ReactDOM.findDOMNode from the code.
  • Implement useRef to manage references to DOM elements in functional components.
  • Update the BlockStyles class to eliminate dependencies on class components, using hooks to maintain consistency and efficiency in the code.

legacy.reactjs.org
stackoverflow.com/questions/60903335
pragmaticwebsecurity.com

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.

1 participant