study_record

  • 홈
  • 태그
  • 방명록

useReducer 1

[React] useState? useReducer? useReducer에 대해 파헤쳐보자

useReducer React Hooks의 하나로서 useState와 같이 state를 생성하고 관리할 수 있는 hook이다. 여러 개의 하위 값을 포함하는 복잡한 state를 관리할 때 useState 대신에 useReducer를 쓰면 관리 및 유지보수 하기 좋다. useReducer는 Reducer, Dispatch, Action 이 세 가지로 이루어져 있다. Reducer는 Dispatch가 보낸 Action의 내용대로 state를 직접 수정하는 주체이고, Dispatch는 Reducer에게 state를 수정할 방식(Action)을 보내는 주체이고, Action은 Dispatch가 보낸 state를 수정할 방식을 담고 있는 메시지이다. 사용법 1. useReducer const [value, dis..

프론트엔드/React 2024.01.30
이전
1
다음
더보기
프로필사진

study_record

이전 블로그 https://velog.io/@ro_sie/posts

  • Study (241)
    • CS (25)
      • 네트워크 (2)
      • 컴퓨터구조 (9)
      • 운영체제 (4)
      • 자료구조 (0)
      • 소프트웨어 공학 (0)
    • 알고리즘 (7)
    • 프론트엔드 (29)
      • JavaScript (3)
      • React (17)
      • HTML (0)
      • CSS (1)
      • TypeScript (4)
      • NextJS (3)
    • PS (169)
      • 백준 (130)
      • 프로그래머스 (39)
    • Python (4)
    • Web (5)

Tag

이분 탐색, 백준, 깊이 우선 탐색, Python, 에라토스테네스의 체, 너비 우선 탐색, 다이나믹 프로그래밍, CS, 그리디, BFS, 프로그래머스, DP, 정렬, 파이썬, BOJ, programmers, react, 이진 탐색, hooks, DFS,

최근글과 인기글

  • 최근글
  • 인기글

최근댓글

공지사항

페이스북 트위터 플러그인

  • Facebook
  • Twitter

Archives

Calendar

«   2025/06   »
일 월 화 수 목 금 토
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

방문자수Total

  • Today :
  • Yesterday :

Copyright © Kakao Corp. All rights reserved.

티스토리툴바