Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

5주차 과제 제출... #6

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

k-loopy
Copy link

@k-loopy k-loopy commented Nov 11, 2024

Description

  • 어쩌구 저쩌구

Important content

  • 어쩌구 저쩌구

Question

  • 어쩌구 저쩌구

Reference

Comment on lines +14 to +38
const addTodo = (): void => {
if (input.trim() === "") {
alert("등록할 일정을 입력해주세요!");
return;
}
const newTodo: Todo = {
id: Date.now(),
todoText: input,
isDone: false,
};
setTodos([...todos, newTodo]);
setInput("");
};

const toggleTodo = (id: number): void => {
setTodos(
todos.map((todo) =>
todo.id === id ? { ...todo, isDone: !todo.isDone } : todo
)
);
};

const deleteTodo = (id: number): void => {
setTodos(todos.filter((todo) => todo.id !== id));
};
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

함수의 반환값이 없다는 것을 명시적으로 작성해주셨네요!
명시적으로 작성해주신 이유가 있으실까요?

Comment on lines +10 to +12
const TodoList: React.FC = () => {
const [todos, setTodos] = useState<Todo[]>([]);
const [input, setInput] = useState<string>("");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

React.FC가 무엇인가요? 이렇게 작성하신 이유도 알려주세요

Copy link
Contributor

@leemanjae02 leemanjae02 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • 과제 피드백
  1. 과제에서 요구하는 기능은 전부 구현하셨지만 스타일 부분이 많이 다른 것 같아요
  2. 할 일 일정 체크시 표시되는 선이 삭제버튼까지 표시됩니다!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants