Skip to content
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

[8팀 채예린] [Chapter 1-3] React, Beyond the Basics #35

Open
wants to merge 12 commits into
base: main
Choose a base branch
from

Conversation

chyerin802
Copy link

@chyerin802 chyerin802 commented Oct 9, 2024

과제 체크포인트

기본과제

  • shallowEquals 구현 완료
  • deepEquals 구현 완료
  • memo 구현 완료
  • deepMemo 구현 완료
  • useRef 구현 완료
  • useMemo 구현 완료
  • useDeepMemo 구현 완료
  • useCallback 구현 완료

심화 과제

  • 기본과제에서 작성한 hook을 이용하여 렌더링 최적화를 진행하였다.
  • Context 코드를 개선하여 렌더링을 최소화하였다.

리뷰 받고 싶은 내용

궁금한 점

과제를 수행하면서 느낀점

과제 시작 전 생각

과제 제출 후 생각

기타

과제 난이도

chyerin802 and others added 12 commits October 6, 2024 14:19
* feat: user, notification 타입 분리

* feat: context 관련 파일 분리 및 AppContext 구현

- useAppContext 훅, AppProvider 구현

* feat: 하위 컴포넌트 분리

* refactor: App 컴포넌트에서 컨텍스트, 컴포넌트, 타입 관련 코드 분리

---------

Co-authored-by: chyerin <[email protected]>
* feat: theme context 구현

* feat: notification context 구현

* feat: user context 구현

* style: 주석 제거

* refactor: context 관련 파일 named export로 변경

* refactor: App context 제거 및 다른 context 로 대체

---------

Co-authored-by: chyerin <[email protected]>
* refactor: 컴포넌트에 memo 적용

- context 변경으로 상위 컴포넌트가 리렌더링 되는 경우, 불필요한 리렌더링 방지

* refactor: UserProvider 최적화 적용

- notification context 의 변경이 있을 때, `useUserContext` 를 사용하는 컴포넌트가 리렌더링이 되는 문제 개선 (UserProvider 에서 `useNotificationContext` 를 사용하기 때문)
- NotificationProvider 의 `addNotification` 에 `useCallback` 적용
- UserProvider의 context value 에 `useMemo`, 그 외 함수에 모두 `useCallback` 적용

* refactor: 상품 리스트 생성 함수에 useMemo 적용

---------

Co-authored-by: chyerin <[email protected]>
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.

1 participant