Skip to content

Conversation

@kbs1115
Copy link

@kbs1115 kbs1115 commented Mar 20, 2023

2023-03-20 (월) 신입 스터디 과제

노정훈 화이팅

@kbs1115 kbs1115 changed the title assignment 02 - CSS CSS & JS assignments Mar 22, 2023
const sq = squares.slice()
sq.fill('')
setSquares(sq)//배열의 상태는 빈 칸으로 되돌린다.
status = 'Next player: ' + next;//표시되는 state 역시 되돌린다.
Copy link
Owner

Choose a reason for hiding this comment

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

이거 status는 안 바꿔도, 리렌더링할 때 아래 58번 라인 실행돼서 안넣어줘도 돼여

status = 'Next player: ' + next;//표시되는 state 역시 되돌린다.
}
const makeStartButton = () => {
if(hasWinner() || isFilled)
Copy link
Owner

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