[5주차/클레버] 워크북 제출합니다#53
Open
kcleverp wants to merge 7 commits intoUMC-Inha:클레버/mainfrom
Open
Conversation
OscarKang1
reviewed
May 2, 2026
aeongiing
reviewed
May 2, 2026
bukyung03
reviewed
May 2, 2026
qkrdmsthff
approved these changes
May 4, 2026
Collaborator
qkrdmsthff
left a comment
There was a problem hiding this comment.
LGTM 클레버 이번주도 화이팅입니다 ~~
Comment on lines
+37
to
+40
| const token = getAccessToken() | ||
| if(token){ | ||
| setAccessToken(token) | ||
| } |
Collaborator
There was a problem hiding this comment.
현재 useEffect 안에서 getAccessToken() 으로 token 에 들어있는 값을 가져와 setAccessToken(token) 을 호출하고 있습니다!
문제점 : useLocalStorage 훅이 리액트 상태를 포함하고 있다면, useEffect 안에서 다시 set 을 호출하는 것은 불필요한 리렌더링을 발생시킵니다!
useLocalStorage 내부에서 Lazy Initialization 를 사용하면, useEffect 에서 수동으로 다시 설정할 필요가 없습니다!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
✅ 워크북 체크리스트
✅ 컨벤션 체크리스트
📌 주안점