-
-
Save neurobug/24ecee18277f3de7c82c8bf83e2f8e92 to your computer and use it in GitHub Desktop.
Canvas component
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react' | |
import useCanvas from '../hooks/useCanvas' | |
const Canvas = props => { | |
const { draw, ...rest } = props | |
const canvasRef = useCanvas(draw) | |
return ( | |
<canvas ref={canvasRef} {...rest} /> | |
) | |
} | |
export default Canvas |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment