import React, { useState } from "react"; type Todo = { id: number; text: string; completed: boolean; }; const Todo: React.FC = ({ id, text, completed }) => { const [checked, setChecked] = useState(completed); const handleChange = () => { setChecked(!checked); }; return (

{text}

); }; export default Todo;