v.02 / 2026
HOME / PROGRAMMING / №010 2026.02.10
← Programming // 010 · PROGRAMMING / FRONTEND

React 상태 관리 라이브러리 비교 — Zustand vs Jotai vs Redux

왜 상태 관리 라이브러리가 필요한가

컴포넌트가 3개일 때는 useState로 충분합니다. 하지만 앱이 커지면서 여러 컴포넌트가 같은 데이터를 공유해야 할 때 “prop drilling” 문제가 발생합니다.

Zustand — 가장 심플한 선택

npm install zustand
import { create } from 'zustand';

const useStore = create((set) => ({
  count: 0,
  increment: () => set((state) => ({ count: state.count + 1 })),
  reset: () => set({ count: 0 }),
}));

function Counter() {
  const { count, increment } = useStore();
  return <button onClick={increment}>{count}</button>;
}

장점: 보일러플레이트 거의 없음, 직관적, 번들 크기 작음

Jotai — 원자 단위 상태 관리

npm install jotai
import { atom, useAtom } from 'jotai';

const countAtom = atom(0);
const doubleAtom = atom((get) => get(countAtom) * 2);

function Counter() {
  const [count, setCount] = useAtom(countAtom);
  return <button onClick={() => setCount(c => c + 1)}>{count}</button>;
}

장점: Recoil과 유사, 파생 상태 선언이 자연스러움

Redux Toolkit — 대규모 앱의 표준

npm install @reduxjs/toolkit react-redux
import { createSlice, configureStore } from '@reduxjs/toolkit';

const counterSlice = createSlice({
  name: 'counter',
  initialState: { value: 0 },
  reducers: {
    increment: (state) => { state.value += 1; },
  },
});

export const store = configureStore({ reducer: { counter: counterSlice.reducer } });

장점: DevTools 강력, 미들웨어 생태계, 대팀 협업에 적합

선택 기준

상황추천
소규모 프로젝트Zustand
복잡한 파생 상태Jotai
대규모 / 팀 프로젝트Redux Toolkit
// RELATED №053 git branch는 포인터, git worktree는 작업 공간 — 언제 무엇을 쓸까 [PROGRAMMING] Git 2026.05.04 №052 Roboflow Safety Helmet ONNX 모델이란? 안전모 감지의 개념과 활용 [PROGRAMMING] AI 2026.05.04 №051 LLM Wiki: 위키 유지보수를 LLM에게 맡기다 [PROGRAMMING] Tools 2026.05.04
목록으로