상태관리 라이브러리
상태관리 라이브러리 zustand, 리덕스처럼 사용, 클래스로 만들어서 사용
공식 문서 Zustand Documentation Zustand Documentation Zustand is a small, fast and scalable bearbones state-management solution, it has a comfy api based on hooks docs.pmnd.rs 설치하기 npm install zustand 스토어 생성하기 import { create } from 'zustand' const useStore = create((set) => ({ bears: 0, increasePopulation: () => set((state) => ({ bears: state.bears + 1 })), removeAllBears: () => set({ bears: 0 }), ..
2024. 3. 1. 02:03