i'm trying to take screenshot of my page and i'm using ref + html2canvas to do that. Now i would need to take screenshot of that component in different state. I would like to render (if that's the correct word) that component in that specific state without showing it to the user and have the canvas properly capture it.
Is there a way to paint an element into canvas without showing it to the user?