Parameters
-
setItems: ((items) => void)
-
- (items): void
-
Returns void
Returns {
canvasRef: RefObject<HTMLCanvasElement>;
clear: ((clearBoard?) => void);
onMouseDown: (() => void);
promptUserRecogination: (() => Promise<undefined | string>);
undoStroke: (() => void);
}
a reference to the html canvas, a function that should be called
the user presses, and a function for clearning the canvas
-
canvasRef: RefObject<HTMLCanvasElement>
-
clear: ((clearBoard?) => void)
-
- (clearBoard?): void
-
Parameters
-
clearBoard: boolean = true
Returns void
-
onMouseDown: (() => void)
-
promptUserRecogination: (() => Promise<undefined | string>)
-
- (): Promise<undefined | string>
-
Returns Promise<undefined | string>
-
undoStroke: (() => void)
useDraw provides functionality for drawing on an html canvas