rn-perfect-sketch-canvas
rn-perfect-sketch-canvas copied to clipboard
'useRef' for Javascript
I noticed that your example is in TypeScript. When I try copying the sample code into my JavaScript code, I get an error, saying:
Error: Function components cannot have string refs. We recommend using useRef() instead.
When I remove the useRef, there are no errors, but then I can't reset the canvas.