-
Notifications
You must be signed in to change notification settings - Fork 8
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
Feat/파티어드민 패널티항목구현 #1309 #1315
The head ref may contain hidden characters: "feat/\uD30C\uD2F0\uC5B4\uB4DC\uBBFC-\uD328\uB110\uD2F0\uD56D\uBAA9\uAD6C\uD604-#1309"
Feat/파티어드민 패널티항목구현 #1309 #1315
Conversation
|
||
useEffect(() => { | ||
if (partyPenalty) { | ||
setIsUpdateMode(true); |
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.
이것도 불필요할 것 같아요
state의 초기값으로 !!partyPenalty 넣던지 아니면 그냥 일반 변수로 해도 될것 같아요
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.
useState을 쓰는게 더 직관적이고 이해하기 쉬운것같은데 사용하는 이유는 밑에 변경인지 추가인지 판별하려고 넣은거라
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.
useState쓰는건 상관없는데 이걸 useEffect에서 설정할 필요가 없을것 같아요
그냥 초기값을 설정할때 바로 넣어줄 수 있지않나요?
!!partyPenalty 나
partyPenalty ? true : false 같은 방식으로
📌 개요
💻 작업사항
✅ 변경로직