Loading tutorials
create turns it into a hook.2 min readcreate as in the previous chapter. It covers how components read state from a Zustand store, and why the way you read it affects rendering.2 min readcreate, and you understand immutable updates (copying objects instead of changing them).2 min readcreate and read it with selectors. It also assumes you know why selectors affect re-renders.1 min readset. It also assumes you know async/await and fetch. Here you will put a network request inside a store action and track its progress.2 min readcreate. Here you will type a store correctly and see why the syntax has an extra pair of parentheses.2 min readcreate, read it with selectors, and update it with set. It also assumes you know basic TypeScript modules. Here you will use a store from code that is not a React component.2 min readcreate, know that set merges partial state, and read TypeScript generics. It builds on the typed create<T>()(...) form.2 min readcreate, update it with set, and compose middleware as covered in the previous chapter. By default, a Zustand store lives in memory, so a page reload resets it. The persist middleware saves state to a storage area and restores it when the store i2 min readcreate, write actions with set, and know that middleware wraps the state creator, as covered in the earlier chapters.2 min readcreate, update it with set, and read the spread syntax for objects and arrays. It builds on the earlier chapters on updating state and on middleware.2 min readcreate, read it with selectors, and type it with create<T>()(...). It also assumes you know how set merges partial state.2 min readcreate, read it with selectors, and use React context and useRef. It covers the case where one module-level store is the wrong choice.2 min readcreate, call getState and setState outside React, and run tests with Vitest or a similar runner. If those are new, review the chapters on creating stores and on using a store outside React first.2 min readset. It covers the mistakes that cause extra renders or broken state, and the cases where another tool fits better.2 min read