I am trying to use html-to-image to create a downloadable image of a specific html card. In its documentation it specifies to use
var node = document.getElementById('my-node');
htmlToImage.toPng(node)...
But this works on real DOM and not in react. I tried using refs but its unfruitful. The card and the download button is in different branches in Component Hierarchy.