npm install zustandimport { create } from "zustand"; const useStore = create<{ count: number; inc: () => void }>((set) => ({ count: 0, inc: () => set((state) => ({ count: state.count + 1 })),})); export function Counter() { const { count, inc } = useStore(); return <button onClick={inc}>Count: {count}</button>;}