import React from 'react'; import { useRedrawer } from './useRedrawer'; interface IProps { n: number; } export const HookTester: React.FunctionComponent = props => { const [canvasRef] = useRedrawer(props, draw, 1000, [props]); function draw(ctx: CanvasRenderingContext2D) { ctx.fillText(props.n.toString(), 10, 10) } return ; };