.exportImage() not working #82
-
Hi all , I just cannot get the Promise functions in ReactSketchCanvas to work! I am using React 16.5.2 together with react-sketch-canvas 5.3.3 for some backward compatibility reasons. I have been able to export sketches to .png format previously, but now it doesn't work for some mysterious reason. I even tried the sample code from here: Below is the test code from the above page. I can draw a sketch, but when clicking the button I get the "Button clicked" console message but no data. I am fairly certain that the refCanvas.current is valid through experimentation. Suspect something fundamentally wrong but can't figure it out. Grateful for any help to find what's wrong!! Have a great day! :) ` import * as React from "react";
} Here's my package.json (minus the header fields for secrecy):
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
Hi @heart6205, Your code looks correct and it seems to work. You can check it here https://codesandbox.io/s/export-image-example-dzk850 |
Beta Was this translation helpful? Give feedback.
Hi @heart6205,
Your code looks correct and it seems to work. You can check it here https://codesandbox.io/s/export-image-example-dzk850