title: #REACT Convert a JSX.Element to an HTMLElement
body: <p>I want to use this library for my react js project <a href="https://www.npmjs.com/package/html-to-image" rel="nofollow noreferrer">https://www.npmjs.com/package/html-to-image</a>.</p>
  <p>In my case I want to use a var that contain a simple div and export It as an Image, but there's a problem: my var (node) is a JSX.Element and the &quot;toPng&quot; method of the library accept as a parameter an HTMLElement.</p>
  <p><a href="https://i.stack.imgur.com/H8lXN.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/H8lXN.png" alt="enter image description here" /></a></p>
  <p><a href="https://i.stack.imgur.com/6YtRd.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/6YtRd.png" alt="enter image description here" /></a></p>
  <p>I know that the doc of the library suggests to use methods like this to get an HTMLElement: <code>var node = document.getElementById('my-node')</code> but in my case I can't do something like this because my node isn't in the document.</p>
  <p>So there's a way to convert a JSX.Element to an HTMLElement? Thanks in advance ;)</p>