Closed marcosaurelioo closed 4 years ago
<div>
<CanvasDraw
brushColor='#000'
lazyRadius='0'
brushRadius='3'
canvasWidth={400}
canvasHeight={200}
style={{ marginLeft: 10, marginRight: 10 }}
ref={canvasDraw => (this.saveableCanvas= canvasDraw)}
>
</CanvasDraw>
<button onClick={() => this.saveableCanvas.clear()}>Clear</button> </div>
@NishantTadvi Didn't work.
Well, work with useRef().
@Maark007 can you tell me how you user useRef here ? Thanks :)
Well I tried these way: ``
``
Where the saveableCanvas come from?