I am using react-konva in a project to render HTML5-canvas elements:
import desktop_tea_1 from "./previews_desktop/tea_1.png";
const DesktopTea1 = () => {
const [desktop_tea_1_const] = useImage(desktop_tea_1);
return <Image image={desktop_tea_1_const} width={600} height={600} />;
};
(...)
<Stage width={600} height={600}>
<Layer ref="DesktopTea1">
<DesktopTea1/>
</Layer>
</Stage>
Now I want the HTML-output to have a id (myId) like:
<canvas width="600" height="600" id="myId"></canvas>
I can only find the konva-id but nothing to set a HTML-id.