-
Notifications
You must be signed in to change notification settings - Fork 0
Dev branch #3
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
base: pr-jihee
Are you sure you want to change the base?
Dev branch #3
Conversation
GHeeJeon
left a comment
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.
상세한 주석과 분리된 컴포넌트 덕분에 코드를 더 잘 이해할 수 있었습니다!
이 리액트 프로젝트를 배포해보는 건 어떤가요!?
|
|
||
| //List에서 handleClick를 사용하기 때문에 리랜더링발생 --> 성능저하 | ||
| //useCallback() : DiaryData가 변하지 않는다면 함수는 새로 생성되지 않음(새로 생성되지 않으므로 메모리에 새로 할당되지 않고 동일 참조값을 사용) | ||
| const handleClick = useCallback((id) => { |
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.
함수의 재사용성을 위해 useCallback 을 사용하셨군요!
컴포넌트 최적화에 도움이 되는 방법이라고 생각합니다.
리팩토링 할 때 참고하겠습니다. useCallback ! 기억할게요!
| height: 30px; | ||
| padding:0px; | ||
| } | ||
| .diary-submit{ |
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.
.diary-input 과 더불어 .diary-submit 은 어디에 쓰이나요?
이미 main 과 동기화된 변동사항인지, 현재 pr에서 찾아봤는데 보이질 않네요ㅠㅠ
|
|
||
| const root = ReactDOM.createRoot(document.getElementById('root')); | ||
| root.render( | ||
| <React.StrictMode> |
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.
<React.StrictMode> 는 레거시 스트링 ref 사용에 대한 경고 및 안전하지 않은 생명주기 메서드 사용에 대한 경고 등 잠재적인 문제를 감지하는 코드로 알고 있습니다.
<React.StrictMode> 를 사용하지 않는다고 해서 앱이 작동하지 않거나 중대한 문제가 생기는 것은 아니지만, <React.StrictMode> 를 제거하신 이유가 궁금합니다!
코드리뷰 시작합니다!