[10주차/눈송이] 워크북 제출합니다.#111
Open
wooojin401 wants to merge 4 commits intoUMC-Inha:눈송이/mainfrom
Hidden character warning
The head ref may contain hidden characters: "\ub208\uc1a1\uc774/main"
Open
Conversation
chxxwn04
reviewed
Dec 21, 2025
| const [selected, setSelected] = useState<Movie | null>(null); | ||
|
|
||
| // ✅ params 객체를 useMemo로 고정 (불필요 렌더/호출 방지) | ||
| const params = useMemo( |
There was a problem hiding this comment.
검색 파라미터 객체를 useMemo로 고정하여, 렌더링마다 새로운 객체가 생성되는 문제를 방지해 params를 의존성으로 사용하는 useCallback(handleSubmit)이 불필요하게 재생성되지 않아, 훅 간의 의존 관계가 안정적으로 유지된 점이 좋은 것 같습니다.
Collaborator
|
키워드 파일이 안 올라온것 같아요! 내용이 비어 있다고 뜹니다 |
sunnyinha
reviewed
Dec 22, 2025
|
|
||
| const handleClickMovie = useCallback((movie: Movie) => { | ||
| setSelected(movie); | ||
| }, []); |
Collaborator
There was a problem hiding this comment.
handleClickMovie는 다수의 MovieCard에 전달되는 콜백이므로 useCallback으로 참조 안정성을 확보하고
의존성 배열을 정확히 관리해 불필요한 리렌더링과 stale closure 문제를 방지한 점이 좋네요!
Collaborator
|
눈송이 마지막까지 열심히 미션 수행해주셔서 감사하고 데모데이까지 파이팅입니다! |
sunnyinha
approved these changes
Dec 22, 2025
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.
✅ 워크북 체크리스트
✅ 컨벤션 체크리스트
📌 주안점