title: what is the alternative for ReactDOM.findDOMNode() as it is deprecated now?
body: <p>I have an old code which is using <code>findDOMNode()</code>.</p>
  <p>Here is my code, where <code>someComponent1</code> and <code>Expand</code> is already imported.</p>
  <p>Here I have some doubt the code I have written with <code>findDOMNode()</code> is working perfectly fine but as it is deprecated now I want to remove it. I have gone through many document and found to use portals or refs instead of this.
  I have a understanding that if I am using ref then the variable get bind to that also has an access to the DOM element, but I guess I am wrong as it is working in that way. Can someone please correct my understanding on this</p>
  <pre><code>class classA extends Component {
  
    componentDidMount() {
      new Expand(ReactDOM.findDOMNode(this.expand))
      // new Expand(this.expand)    
    }
  
    render(){
  
      return(
        &lt;someComponent1 className={style.container} ref={e =&gt; this.expand= e}/&gt;
      )
    }
  }
  </code></pre>