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

Open
wants to merge 11 commits into
base: main
Choose a base branch
from

Conversation

hanseulhee
Copy link
Member

No description provided.

@hyesungoh hyesungoh self-requested a review May 26, 2022 04:34
Copy link
Contributor

@hyesungoh hyesungoh left a comment

Choose a reason for hiding this comment

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

👍 👍 👍 👍
고생하셨어요!! 👍 👍

src/Todo.tsx Outdated
</form>
<ul className="listUl">
{todos.map((todo: ITodo) =>
<li key={todo.id} className="list"><input type="checkbox"/>{todo.summary}</li>
Copy link
Contributor

Choose a reason for hiding this comment

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

과제에서 요구한 사항은 id까지 렌더링하는 거긴 했는데 !!

Copy link
Member Author

Choose a reason for hiding this comment

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

😮😮😮 그랬나요 ?!

src/Todo.tsx Outdated
const [newTodos, setNewTodos] = useState<string>("");

function onSubmitForm(event: FormEvent<HTMLFormElement>) {
event?.preventDefault();
Copy link
Contributor

Choose a reason for hiding this comment

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

여기서는 옵셔널 체이닝이 필요 없을 거 같아요!

Suggested change
event?.preventDefault();
event.preventDefault();

src/Todo.tsx Outdated
}

function onChangeInput(event: ChangeEvent<HTMLInputElement>) {
setNewTodos(Object(event.target.value));
Copy link
Contributor

Choose a reason for hiding this comment

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

여기서 Object 형식으로 wrapping하는 이유가 뭔가요??

newTodos는 string type인데, object 형태로 하신 이유가 있을까요??

Copy link
Member Author

Choose a reason for hiding this comment

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

실수용 ㅠ

src/Todo.tsx Outdated

function Todo() {
const [todos, setTodos] = useState<ITodo[]>([]);
const [newTodos, setNewTodos] = 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.

현재 이 state는 추가될 한 가지의 상태의 입력 값을 저장하고 있는 걸로 보여요.

근데 이름이 복수형으로 되어있어 혼란을 야기할 수 있는 이름인 거 같아요 !

Copy link
Member Author

Choose a reason for hiding this comment

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

OMG 😅👍👍

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