-
Notifications
You must be signed in to change notification settings - Fork 5
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
Gyujin #1
base: master
Are you sure you want to change the base?
Gyujin #1
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍👍👍 자세한 코멘트는 추후에...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
저도 바닐라 컴포넌트 개발은 처음이라 확실치는 않지만 흠없어보이네요 ! 아주 좋습니다
}, | ||
}; | ||
|
||
class App { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
저는 바닐라로 컴포넌트를 만드는게 처음이라 잘 모르는데 그냥 App 클래스 하나를 만들고 내부 로직을 다 때려박으면 되나요?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
아무래도 그런것같네요 .. https://junilhwang.github.io/TIL/Javascript/Design/Vanilla-JS-Component/#_1-%E1%84%87%E1%85%AE%E1%86%AF%E1%84%91%E1%85%A7%E1%86%AB%E1%84%92%E1%85%A1%E1%86%B7%E1%84%8B%E1%85%B3%E1%86%AF-%E1%84%80%E1%85%A1%E1%86%B7%E1%84%8C%E1%85%B5%E1%84%92%E1%85%A1%E1%84%80%E1%85%B5 저는 규진님 코드와 이 글보면서 디벨롭중입니다.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
저는 이 글 보면서 개발했습니다.
https://prgms.tistory.com/53
아무래도 앱 규모가 작다 보니까 하나로 통일해서 코드를 작성했는데, 로그인 파트와 사진 가져오기 파트는 분리가 가능할 것 같네요. 수정해볼게요
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
하나로 하는 것보다 기능별로 스크립트를 나누는 것이 좋을 것 같습니다. 바닐라 JS 로 짜도 리액트처럼 컴포넌트 분리가 가능한걸로 알고 있습니다.
참고: https://dubaiyu.tistory.com/209
this.$photoContainer = document.getElementById('photo'); | ||
this.$loginModal = document.getElementById('modal'); | ||
this.api = api; | ||
const $photoBtn = document.getElementById('btn-photo'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
관심사의 분리를 위해 setEvent 함수를 따로 빼도 좋을 것 같네요
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
이 부분에 있어 어떻게 처리할지를 모르겠어요.
그리고 소멸자가 없어서 이벤트 리스너 등록 해제가 안되는 것도 불편
No description provided.