Skip to content
Myr

index.md

This file

Path

docs/learn/index.md

54 lines · 3.1 KiB · Markdown

Last changed by

Fix README internal links for GitHub rendering (#3403)Copilotbefore adoptionda381c3

History of this file

Take it

Revamping docs - file restructuring (#3392)Danilo Brittobefore adoption8eae4e9

lines 1–9why, one step back
1---
2title: Learn3description: A guided path to understand Zustand fundamentals, common patterns, and when to reach for specific tools.4---56## Start here78If you are new to Zustand, begin here for installation, a high-level overview, and a hands-on tutorial.9

Fix README internal links for GitHub rendering (#3403)Copilotbefore adoptionda381c3

lines 10–12why, one step back
10- [Introduction](./getting-started/introduction.md) — Install Zustand and create your first store.
11- [Comparison with other tools](./getting-started/comparison.md) — See how Zustand compares to Redux, Jotai, Recoil, and others.12- [Tutorial: Tic Tac Toe](./guides/tutorial-tic-tac-toe.md) — Build a complete game to learn Zustand concepts step by step.

Revamping docs - file restructuring (#3392)Danilo Brittobefore adoption8eae4e9

lines 13–17why, one step back
13
14## Core concepts1516The fundamentals of reading and updating state in a Zustand store.17

Fix README internal links for GitHub rendering (#3403)Copilotbefore adoptionda381c3

lines 18–22why, one step back
18- [Updating state](./guides/updating-state.md) — How to update primitive values, objects, and nested state.
19- [Practice with no store actions](./guides/practice-with-no-store-actions.md) — Define state updates outside the store for simpler patterns.20- [Slices pattern](./guides/slices-pattern.md) — Split a large store into smaller, composable slices.21- [Immutable state and merging](./guides/immutable-state-and-merging.md) — Understand how Zustand merges state and when to spread manually.22- [Maps and sets usage](./guides/maps-and-sets-usage.md) — Work with `Map` and `Set` inside Zustand state correctly.

Revamping docs - file restructuring (#3392)Danilo Brittobefore adoption8eae4e9

lines 23–27why, one step back
23
24## Performance and rendering2526Techniques for keeping re-renders minimal and components fast.27

Fix README internal links for GitHub rendering (#3403)Copilotbefore adoptionda381c3

lines 28–30why, one step back
28- [Prevent rerenders with useShallow](./guides/prevent-rerenders-with-use-shallow.md) — Use shallow comparison to avoid unnecessary re-renders when selecting objects.
29- [Connect to state with URL hash](./guides/connect-to-state-with-url-hash.md) — Sync store state with the URL hash for shareable UI state.30- [Event handler in pre React 18](./guides/event-handler-in-pre-react-18.md) — Handle the batching edge case in React 17 and earlier.

Revamping docs - file restructuring (#3392)Danilo Brittobefore adoption8eae4e9

lines 31–35why, one step back
31
32## TypeScript path3334Guides for typing stores, actions, and selectors with TypeScript.35

Fix README internal links for GitHub rendering (#3403)Copilotbefore adoptionda381c3

lines 36–38why, one step back
36- [Beginner TypeScript](./guides/beginner-typescript.md) — Type a basic store with state and actions.
37- [Advanced TypeScript](./guides/advanced-typescript.md) — Type slices, middleware stacks, and complex patterns.38- [Auto-generating selectors](./guides/auto-generating-selectors.md) — Generate typed selectors automatically from a store definition.

Revamping docs - file restructuring (#3392)Danilo Brittobefore adoption8eae4e9

lines 39–43why, one step back
39
40## Frameworks and platforms4142Using Zustand in server-rendered and framework-specific environments.43

Fix README internal links for GitHub rendering (#3403)Copilotbefore adoptionda381c3

lines 44–46why, one step back
44- [Next.js](./guides/nextjs.md) — Set up Zustand in a Next.js app with proper SSR handling.
45- [SSR and hydration](./guides/ssr-and-hydration.md) — Avoid hydration mismatches when rendering on the server.46- [Initialize state with props](./guides/initialize-state-with-props.md) — Seed a store's initial state from React component props.

Revamping docs - file restructuring (#3392)Danilo Brittobefore adoption8eae4e9

lines 47–51why, one step back
47
48## Testing and quality4950Best practices for writing reliable, maintainable code with Zustand.51

Fix README internal links for GitHub rendering (#3403)Copilotbefore adoptionda381c3

lines 52–54why, one step back
52- [Testing stores and components](./guides/testing.md) — Test store logic and React components that consume a store.
53- [Flux-inspired practice](./guides/flux-inspired-practice.md) — Apply Flux conventions to keep state changes predictable.54- [How to reset state](./guides/how-to-reset-state.md) — Reset a store back to its initial state on demand.