Tag

Zustand

1 views collected around this technical thread.

Sohu Tech Products
Sohu Tech Products
Feb 19, 2025 · Frontend Development

Comprehensive Guide to React State Management

This guide explains React state management fundamentals, covering local state with useState, useReducer, class components, and custom hooks; global solutions such as Context API, Zustand, Jotai, and Redux; and server‑side handling using React Query, SWR, plus navigation and form state best practices.

Context APICustom HooksForms
0 likes · 30 min read
Comprehensive Guide to React State Management
Sohu Tech Products
Sohu Tech Products
Jan 22, 2025 · Frontend Development

Comprehensive Guide to State Management in React

This guide explains React’s various state types—local, class, global, navigation, form, and persistent—showing how to manage each with built‑in hooks, Context, libraries such as Zustand, Jotai, React Query, SWR, React Router, TanStack Router, React Hook Form, Formik, and persistence tools like localStorage and redux‑persist.

Context APIForm HandlingHooks
0 likes · 36 min read
Comprehensive Guide to State Management in React
Rare Earth Juejin Tech Community
Rare Earth Juejin Tech Community
Nov 4, 2024 · Frontend Development

Deep Dive into Zustand: Store Creation, TypeScript Types, and Middleware Design

This article explains how Zustand creates stores using the create function, details the TypeScript types such as StateCreator, SetStateInternal, Get and Mutate, demonstrates middleware implementation, clarifies the role of createImpl and useStore, and answers common memory‑leak concerns for React developers.

Zustandmiddlewarereact
0 likes · 25 min read
Deep Dive into Zustand: Store Creation, TypeScript Types, and Middleware Design
Code Mala Tang
Code Mala Tang
Jul 22, 2024 · Frontend Development

Inside Zustand: How Its Core Store and Hooks Are Built for React

This article dissects the lightweight Zustand state‑management library for React, covering its project layout, core store implementation, the createStore API, the useStore hook, middleware integration, and data‑flow mechanics that enable high‑performance, flexible state handling.

HooksJavaScriptZustand
0 likes · 10 min read
Inside Zustand: How Its Core Store and Hooks Are Built for React
Code Mala Tang
Code Mala Tang
Jul 20, 2024 · Frontend Development

Master Zustand: A Lightweight Yet Powerful State Management Library for React

This guide introduces Zustand, a minimalist React state management library, covering its core concepts, advantages, installation, API usage, best practices, middleware options, TypeScript integration, performance optimizations, and how to integrate it with Next.js for both client‑side and server‑side rendering.

JavaScriptZustandfrontend
0 likes · 12 min read
Master Zustand: A Lightweight Yet Powerful State Management Library for React
Rare Earth Juejin Tech Community
Rare Earth Juejin Tech Community
Mar 26, 2024 · Frontend Development

Zustand Best Practices: Optimization, Persistence, Debugging, and Multi‑Instance Management

This article shares practical insights and best‑practice techniques for using the Zustand state‑management library in React, covering component re‑render optimization, selective persistence, debugging with dev‑tools, handling multiple store instances, custom selectors, and a Vite plugin for automatic selector injection.

OptimizationPersistenceZustand
0 likes · 13 min read
Zustand Best Practices: Optimization, Persistence, Debugging, and Multi‑Instance Management
Rare Earth Juejin Tech Community
Rare Earth Juejin Tech Community
Mar 1, 2024 · Frontend Development

Understanding TypeScript Type Inference in Zustand and Custom React Hooks

This article explores how TypeScript’s type inference works in the Zustand state‑management library, demonstrates practical examples such as automatic value inference, function return inference, generic‑based inference, and builds custom utilities like a pick method and a reusable useRequest hook, while also delving into middleware typing and advanced type‑level tricks.

HooksZustandgenerics
0 likes · 15 min read
Understanding TypeScript Type Inference in Zustand and Custom React Hooks
Rare Earth Juejin Tech Community
Rare Earth Juejin Tech Community
Oct 2, 2023 · Frontend Development

Implementing Permission-Based Dynamic Routing in React with RBAC

This article explains how to build a permission‑driven dynamic routing system for management applications using React, React‑Router, and RBAC, covering the conceptual overview, server‑side role mapping, state management with Zustand, and step‑by‑step code examples for route definition, mapping, and rendering.

Dynamic RoutesPermission RoutingRBAC
0 likes · 10 min read
Implementing Permission-Based Dynamic Routing in React with RBAC
LOFTER Tech Team
LOFTER Tech Team
Apr 6, 2022 · Frontend Development

State Management in React: From Redux to Unstated‑Next, Constate, Zustand, Jotai and Valtio

This article reviews the evolution of React state‑management solutions, comparing classic Redux with modern Hook‑based libraries such as Unstated‑Next, Constate, Zustand, Jotai and Valtio, explains core concepts like algebraic effects, context duplication, and provides practical code examples and performance tips.

Context APIHooksRedux
0 likes · 21 min read
State Management in React: From Redux to Unstated‑Next, Constate, Zustand, Jotai and Valtio
NetEase Cloud Music Tech Team
NetEase Cloud Music Tech Team
Feb 18, 2022 · Frontend Development

Evolution of React State Management: From Local Hooks to Unstated‑Next, Hox, and Zustand

The article traces React’s state‑management evolution from basic useState hooks through unstated‑next and hox to the minimalist zustand library, showing how each step reduces boilerplate, eliminates prop‑drilling and deep providers, and enables precise, hook‑based updates for modern functional components.

HooksHoxJavaScript
0 likes · 13 min read
Evolution of React State Management: From Local Hooks to Unstated‑Next, Hox, and Zustand