I was following this article that says you can get the DOM element of the current component as ReactDOM.findDOMNode(this)
.
But when I try this I get a NULL result in the node
var:
export default function Component(props) {
// Initialization
useEffect(() => {
const node = ReactDOM.findDOMNode(this);
console.log(node); // NULL
}, []);
}