DEV Community

Discussion on: Refactoring Higher-Order Components (HOC) to React Hooks

Collapse
 
wierdorohit123 profile image
rohit raut

One open ques for everybody since i have been working on REACT for past couple of days I'm quite confused with the following. can someone tell me if its a bad practice to use document.querySelector for getting DOM elements in REACT or this should be done only by using ref??? How to handle when we want to capture many elements ?