Skip to content

The ReactDOM.findDOMNode deprecated.#455

Open
cardosource wants to merge 2 commits intoglobocom:masterfrom
cardosource:master
Open

The ReactDOM.findDOMNode deprecated.#455
cardosource wants to merge 2 commits intoglobocom:masterfrom
cardosource:master

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