Skip to content

Conversation

@GHeeJeon
Copy link
Member

코드리뷰 시작합니다!

Copy link
Member Author

@GHeeJeon GHeeJeon left a comment

Choose a reason for hiding this comment

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

상세한 주석과 분리된 컴포넌트 덕분에 코드를 더 잘 이해할 수 있었습니다!
이 리액트 프로젝트를 배포해보는 건 어떤가요!?


//List에서 handleClick를 사용하기 때문에 리랜더링발생 --> 성능저하
//useCallback() : DiaryData가 변하지 않는다면 함수는 새로 생성되지 않음(새로 생성되지 않으므로 메모리에 새로 할당되지 않고 동일 참조값을 사용)
const handleClick = useCallback((id) => {
Copy link
Member Author

Choose a reason for hiding this comment

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

함수의 재사용성을 위해 useCallback 을 사용하셨군요!
컴포넌트 최적화에 도움이 되는 방법이라고 생각합니다.
리팩토링 할 때 참고하겠습니다. useCallback ! 기억할게요!

height: 30px;
padding:0px;
}
.diary-submit{
Copy link
Member Author

Choose a reason for hiding this comment

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

.diary-input 과 더불어 .diary-submit 은 어디에 쓰이나요?
이미 main 과 동기화된 변동사항인지, 현재 pr에서 찾아봤는데 보이질 않네요ㅠㅠ


const root = ReactDOM.createRoot(document.getElementById('root'));
root.render(
<React.StrictMode>
Copy link
Member Author

Choose a reason for hiding this comment

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

<React.StrictMode> 는 레거시 스트링 ref 사용에 대한 경고 및 안전하지 않은 생명주기 메서드 사용에 대한 경고 등 잠재적인 문제를 감지하는 코드로 알고 있습니다.
<React.StrictMode> 를 사용하지 않는다고 해서 앱이 작동하지 않거나 중대한 문제가 생기는 것은 아니지만, <React.StrictMode> 를 제거하신 이유가 궁금합니다!

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.

3 participants