0.1.5 • Published 11 months ago

@coaction/react v0.1.5

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

@coaction/react

Node CI npm license

A Coaction integration tool for React

Installation

You can install it via npm, yarn or pnpm.

npm install coaction @coaction/react

Usage

import { create } from '@coaction/react';

const useStore = create((set) => ({
  count: 0,
  increment: () => set((state) => state.count++)
}));

const CounterComponent = () => {
  const store = useStore();
  return (
    <div>
      <p>Count: {store.count}</p>
      <button onClick={store.increment}>Increment</button>
    </div>
  );
};

Documentation

You can find the documentation here.

0.1.5

11 months ago

0.1.4

11 months ago

0.1.0

11 months ago