본문 바로가기

세현's 개발로그

검색하기
세현's 개발로그
프로필사진 SarahPark

  • 분류 전체보기 (18)
    • Kotlin (4)
    • React (14)
Guestbook
Notice
Recent Posts
Recent Comments
Link
«   2025/07   »
일 월 화 수 목 금 토
1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30 31
Tags
  • useCallback #최적화 #함수형 업데이트
  • useReducer
  • Common JS 모듈 시스템
  • Kotlin
  • React #API 호출 #async #await #fetch
  • 패키지
  • useMemo #React.memo #최적화 #re-rendering
  • Node.js #
  • React #React 사용하는 이유
  • React #Context #props drilling #useMemo
more
Archives
Today
Total
관리 메뉴
  • 글쓰기
  • 방명록
  • RSS
  • 관리

목록useMemo #React.memo #최적화 #re-rendering (1)

세현's 개발로그

[React] useMemo(), React.memo 최적화(feat. 일기장)

◈ Memoization 답을 기억하는 메모이제이션을 프로그래밍에도 사용할 수 있다. ◈ 최적화 최적화는 쉽게 말해 re-render 되는 횟수를 줄이는 것이다. 1. Props가 변경 2. State가 변경 3. 부모 컴포넌트가 re-render 4. Context value가 변경 메모이제이션을 이용하여 rendering 최적화를 해보자. App.js 1) const getDiaryAnalysis = useMemo(() => { if (data.length === 0) { return { goodcount: 0, badCount: 0, goodRatio: 0 }; } console.log("일기 분석 시작"); const goodCount = data.filter((it) => it.emotion >..

React 2023. 5. 7. 16:33
이전 Prev 1 Next 다음

Blog is powered by kakao / Designed by Tistory

티스토리툴바