Canvas.tsx
340 Bytes
import React, { useCallback, useEffect, useRef, useState } from 'react';
import { Vector } from './types';
export const Canvas: React.FC = () => {
const canvasRef = useRef<HTMLCanvasElement>(null);
return (
<div className='mx-3 px-2 py-1 rounded shadow'>
<canvas ref={canvasRef} width='512' height='384' />
</div>
);
}