-
Notifications
You must be signed in to change notification settings - Fork 35
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
[김우성] Sprint 4 #123
The head ref may contain hidden characters: "Basic-\uAE40\uC6B0\uC131"
[김우성] Sprint 4 #123
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.
우성님의 코드 스타일은 리액트스러운데요 !!
벌써 js로 이렇게 재사용성과 함수 분리, 컴포넌트 분리, 라우팅 처리 하시는 것을 보니까
우성님은 앞으로 걱정이 없는데요.. 너무 잘하실듯 👍
리액트도 엄청 금방 배우실 것 같구요!
코드에 자신감을 가지셔도 좋을 거 같습니당 ㅎㅎ
이번주도 화이팅 💯
</div> | ||
<script src="index.js"></script> | ||
<div id="root"></div> | ||
<script type="module" src="main.js"></script> |
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.
script 태그를 불러올 수 있는 방법에는 defer와 async도 있다는 것을 아시나요?
혹시 모르시다면 아래 글 하나 읽어보시면 도움이 될 거에요!
https://ko.javascript.info/script-async-defer
import In from "./src/pages/sign/in.js"; | ||
import Up from "./src/pages/sign/Up.js"; | ||
|
||
document.addEventListener("DOMContentLoaded", () => { |
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.
오 리액트를 이미 사용해보신 분 같아요!
완전 리액트스러운 라우팅 처리입니다 👍
@@ -0,0 +1,28 @@ | |||
"use strict"; |
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.
와우 use strict;까지 ?!
react에서도 React.StrictMode 가 기본으로 사용되요! 요 친구와 비슷한 개념인이 나중에 리액트에서 보시면 어색하진 않으실 것 같네요 💯
|
||
function submitToggle(form, isCompleted) { | ||
const button = form.querySelector(".btn-submit"); | ||
button.classList.toggle("btn-primary", isCompleted); |
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.
toggle 함수 사용하신 것 너무 좋아요!
export default { | ||
[ID.HOME_CONTAINER]: { | ||
click: ({ target }, root) => { | ||
const dataset = target.dataset; |
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.
click event 함수들을 넘겨주는 것 같은데 왠지 함수의 코드가 같아보입니다.!!
이 친구까지 함수로 분리해준다면 더 완벽해질듯 bb
@@ -0,0 +1,11 @@ | |||
"use strict"; | |||
|
|||
const HOME_CONTAINER = "#home-container"; |
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.
상수화 너무 좋구요!
} | ||
} | ||
|
||
@media screen and (max-width: 768px) { |
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.
위에도 max-width 768px가 있었던 것 같아요! 하나로 합쳐주시는 게 유지보수에도 좋고 css는 위에서 아래로 그려지기 때문에 혹시라도 위에 있는 css 가 덮이는 위험도 줄어들 거 같아요 👍
요구사항
기본
심화
주요 변경사항
멘토에게