Skip to content

[5주차/클레버] 워크북 제출합니다#53

Open
kcleverp wants to merge 7 commits intoUMC-Inha:클레버/mainfrom
kcleverp:main
Open

[5주차/클레버] 워크북 제출합니다#53
kcleverp wants to merge 7 commits intoUMC-Inha:클레버/mainfrom
kcleverp:main

Conversation

@kcleverp
Copy link
Copy Markdown

@kcleverp kcleverp commented Apr 29, 2026

✅ 워크북 체크리스트

  • 모든 핵심 키워드 정리를 마쳤나요?
  • 핵심 키워드에 대해 완벽히 이해하셨나요?
  • 이론 학습 이후 직접 실습을 해보는 시간을 가졌나요?
  • 미션을 수행하셨나요?
  • 미션을 기록하셨나요?

✅ 컨벤션 체크리스트

  • 디렉토리 구조 컨벤션을 잘 지켰나요?
  • pr 제목을 컨벤션에 맞게 작성하였나요?
  • pr에 해당되는 이슈를 연결하였나요?(중요)
  • 적절한 라벨을 설정하였나요?
  • 파트장에게 code review를 요청하기 위해 reviewer를 등록하였나요?
  • 닉네임/main 브랜치의 최신 상태를 반영하고 있는지 확인했나요?(매우 중요!)

📌 주안점

Comment thread mission/chapter05-1/src/context/AuthContext.tsx Outdated
Comment thread mission/chapter05-3/src/apis/axois.ts
Comment thread mission/chapter05-1/src/hooks/useLocalStorage.ts Outdated
Copy link
Copy Markdown
Collaborator

@qkrdmsthff qkrdmsthff left a comment

Choose a reason for hiding this comment

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

LGTM 클레버 이번주도 화이팅입니다 ~~

Comment on lines +37 to +40
const token = getAccessToken()
if(token){
setAccessToken(token)
}
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

현재 useEffect 안에서 getAccessToken() 으로 token 에 들어있는 값을 가져와 setAccessToken(token) 을 호출하고 있습니다!

문제점 : useLocalStorage 훅이 리액트 상태를 포함하고 있다면, useEffect 안에서 다시 set 을 호출하는 것은 불필요한 리렌더링을 발생시킵니다!

useLocalStorage 내부에서 Lazy Initialization 를 사용하면, useEffect 에서 수동으로 다시 설정할 필요가 없습니다!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants