I have an array of elements that are drawn on a canvas.
export function useCanvas(){ const canvasRef = useRef(null); const [ elements, setElements] =