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

[3주차] 전시원 미션 제출합니다. #23

Open
wants to merge 30 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
c6feae2
[⌚️feat] : Init project
Mar 24, 2022
f5b938e
[⌚️feat] : Add list
Mar 24, 2022
4427d83
[⌚️feat] : Save data
Mar 24, 2022
4b54ec9
[⌚️feat] : Add toggle
Mar 24, 2022
e8bbcba
[⌨️chore] : Modify rendering style
Mar 24, 2022
6b36e58
[⌚️feat] : Add delete button
Mar 24, 2022
28017c7
[⌚️feat] : Add count number of list
Mar 24, 2022
bb2753b
[📱fix] : Fix localStorage save updating
Mar 24, 2022
e9d358b
[🧨refactor] : Devide code into component
Mar 24, 2022
743fdc4
[🧨refactor] : Devide code into component
Mar 24, 2022
352336c
[🧨refactor] : Devide code into component
Mar 24, 2022
cd6291c
[🧨refactor] : Devide code into component
Mar 24, 2022
11967de
[📱fix] : Find bug
Mar 24, 2022
5274f66
[⌨️chore] : Set maxLength
Mar 24, 2022
544079f
[📱fix] : Find bug
Mar 24, 2022
b2cebe8
[📱fix] Fix bug
Mar 24, 2022
ac130c1
[🧨refactor] : Add css style in all component
Mar 24, 2022
8438aa6
Test commit
Mar 24, 2022
ac54062
[💻build] : typescript
Mar 31, 2022
e8a6881
[🧨refactor] : Apply type and refactor function
Apr 1, 2022
0ad9ee6
[🧨refactor] : Check Type
Apr 1, 2022
ddcb16c
[🧨refactor] : Check type
Apr 1, 2022
c3ef0e8
[🧨refactor] : Apply typescript all components
Apr 1, 2022
fe2b790
[⌨️chore] : delete ""
Apr 1, 2022
9b333ab
[⌨️chore] : delete inline style
Apr 1, 2022
85b97cd
[⌨️chore] : delete inline style
Apr 1, 2022
7554c72
[🧨refactor] : add globalStyle
Apr 1, 2022
f0f19a2
[⌨️chore] : edit
Apr 1, 2022
96519d5
[⌚️feat] : Add custom hooks
Apr 1, 2022
1976c20
[⌚️feat] : Prevent duplicated input data
Apr 1, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions interface.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
import React from 'react';

export interface ITodoList {
contents: string;
id: number;
isDone: boolean;
}
export interface IYetListProps {
list: [];
Copy link

Choose a reason for hiding this comment

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

어떤 array인지 좀더 정확하게...!

Suggested change
list: [];
list: ITodoList;

yetNum: number;
onToggle: (e: React.MouseEvent<HTMLButtonElement>) => void;
onDelete: (e: React.MouseEvent<HTMLButtonElement>) => void;
}

export interface IInputFormProps {
handleFormSubmit: (e: React.SyntheticEvent) => void;
handleContentsChange: (e: React.ChangeEvent<HTMLInputElement>) => void;
contents: string;
}

export interface IDoneList {
list: [];
onToggle: (e: React.MouseEvent<HTMLButtonElement>) => void;
doneNum: number;
}
// styled-component에 들어가는 property 에 대한 정의
export interface IListBtn {
onClick: (e: React.MouseEvent<HTMLButtonElement>) => void;
}
Comment on lines +3 to +29
Copy link

Choose a reason for hiding this comment

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

Props까지 모두 interface로 정리하신게 인상깊은 것 같아요. Type이 아닌 Interface로 정의하신 점이 궁금하게 되는 것 같습니다, 찾아보니까 props는 interface로 정의하는게 관례라고 하는군요. 감사합니다!

Copy link
Author

Choose a reason for hiding this comment

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

오,, 저는 이번에 타입스크립트 처음 써서 그런 관례를 알고 쓴 건 아니었는데 찾아서 정리해주셔서 감사합니다


// 클릭 : MouseEvent
// 입력 : ChangeEvent
// 제출 : SyntheticEvent
Loading