From 205eeeb3193a794a5ea43c47a9cd4475b24e3d62 Mon Sep 17 00:00:00 2001 From: joanne15433 Date: Wed, 15 Oct 2025 17:36:10 +0900 Subject: [PATCH] =?UTF-8?q?[STUDY]=203=EC=A3=BC=EC=B0=A8=20=EC=98=A4?= =?UTF-8?q?=EC=A0=95=EB=AF=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../test-app/src/assignment/week3/Todo.jsx | 36 ++++++++++ .../src/assignment/week3/TodoList.jsx | 64 +++++++++++++++++ .../test-app/src/assignment/week3/useTodo.jsx | 12 ++++ .../test-app/src/chapter_06/Notification.jsx | 42 ++++++++++++ .../src/chapter_06/NotificationList.jsx | 68 +++++++++++++++++++ .../test-app/src/chapter_07/Accommodate.jsx | 36 ++++++++++ .../test-app/src/chapter_07/useCounter.jsx | 12 ++++ jeongmin/codes/test-app/src/index.js | 11 +-- jeongmin/notes/week3.md | 3 + 9 files changed, 279 insertions(+), 5 deletions(-) create mode 100644 jeongmin/codes/test-app/src/assignment/week3/Todo.jsx create mode 100644 jeongmin/codes/test-app/src/assignment/week3/TodoList.jsx create mode 100644 jeongmin/codes/test-app/src/assignment/week3/useTodo.jsx create mode 100644 jeongmin/codes/test-app/src/chapter_06/Notification.jsx create mode 100644 jeongmin/codes/test-app/src/chapter_06/NotificationList.jsx create mode 100644 jeongmin/codes/test-app/src/chapter_07/Accommodate.jsx create mode 100644 jeongmin/codes/test-app/src/chapter_07/useCounter.jsx create mode 100644 jeongmin/notes/week3.md diff --git a/jeongmin/codes/test-app/src/assignment/week3/Todo.jsx b/jeongmin/codes/test-app/src/assignment/week3/Todo.jsx new file mode 100644 index 0000000..6d985d6 --- /dev/null +++ b/jeongmin/codes/test-app/src/assignment/week3/Todo.jsx @@ -0,0 +1,36 @@ +import React, { useRef } from "react"; + +export default function Todo({ title, text, deleteTodo }) { + const toEraseTitle = useRef(null); + + return ( +
+
+
+ {title} +
+
{text}
+
+ +
+ ); +} \ No newline at end of file diff --git a/jeongmin/codes/test-app/src/assignment/week3/TodoList.jsx b/jeongmin/codes/test-app/src/assignment/week3/TodoList.jsx new file mode 100644 index 0000000..d2942cc --- /dev/null +++ b/jeongmin/codes/test-app/src/assignment/week3/TodoList.jsx @@ -0,0 +1,64 @@ +import React, { useState } from "react"; +import useTodo from "./useTodo"; +import Todo from "./Todo"; + +export default function TodoList() { + const [titleInput, setTitleInput] = useState(""); + const [textInput, setTextInput] = useState(""); + const [todo, addTodo, deleteTodo] = useTodo([]); + return ( +
+
+ {todo.map((td, i) => ( + + ))} +
+ +
+ { + setTitleInput(e.target.value); + }} + /> +