How to export a canvas into an image from react-konva?

How to save a drawing from react-konva?

To export any Konva node into an image you can either use the node.toDataURL() or the node.toImage() API. Take a look into the vanilla Konva image export demo.

You will need to use the Refs API to access a Konva node directly in order to call these methods.

Enjoying Konva? Please consider to support the project.