Zust 4 Help 🆕
import { create } from 'zustand'; const useStore = create((set) => ({ count: 0, inc: () => set((state) => ({ count: state.count + 1 })), reset: () => set({ count: 0 }), })); Use code with caution.
This guide will walk you through the essentials of getting Zustand 4 up and running, solving common hurdles, and implementing best practices. 1. Getting Started: The Basic Store zust 4 help
You can call useStore.getState() or useStore.setState() anywhere in your app, even outside of a functional component. import { create } from 'zustand'; const useStore