추가기능1 TodoList 추가 기능 구현 export default function Input({ setTodos }) { const [title, setTitle] = useState(""); const [contents, setContents] = useState(""); const handleSubmitChange = (event) => { event.preventDefault(); const newTodo = { title: title, contents: contents, isDone: false, id: uuidv4(), }; setTodos((prev) => { return [...prev, newTodo]; }); }; const handleTitleChange = (event) => { setTitle(event.target.va.. 2022. 12. 14. 이전 1 다음