0.1.5 • Published 11 months ago

@coaction/zustand v0.1.5

Weekly downloads
-
License
MIT
Repository
github
Last release
11 months ago

@coaction/zustand

Node CI npm license

A Coaction integration tool for Zustand

Installation

You can install it via npm, yarn or pnpm.

npm install coaction @coaction/zustand

Usage

import { create } from 'coaction';
import { bindZustand } from '@coaction/zustand';
import { create as createWithZustand } from 'zustand';

const useStore = create(() =>
  createWithZustand(
    bindZustand((set) => ({
      count: 1,
      inc: () => set((state) => ({ count: state.count + 1 }))
    }))
  )
);

Documentation

You can find the documentation here.

0.1.5

11 months ago