Skip to content

Conversation

@Misu0616
Copy link

과제 제출합니다

Copy link
Contributor

@jeongnaehyeok jeongnaehyeok left a comment

Choose a reason for hiding this comment

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

👍

Comment on lines +9 to +10
const newId = todos.length > 0 ? todos[0].id + 1 : 1;
setTodos([{ id: newId, text: newTodo, isCompleted: false }, ...todos]);
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 +25 to +28
const deleteAll = () => {
setTodos([]);
setdeleteComplete(true);
};
Copy link
Contributor

Choose a reason for hiding this comment

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

추가 기능까지 👍

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