1.0.3 • Published 7 months ago

@shared-state/react v1.0.3

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

@shared-state/react

This package provides a series of APIs for using Shared State via React

Quick Start

Install @shared-state/core and @shared-state/react

pnpm install @shared-state/core @shared-state/react

Example

Using with Function Component

import { createSharedState } from "@shared-state/core";
import { useSharedState } from "@shared-state/react";

const sharedCount = createSharedState(0);

function Counter() {
  const [count, setCount] = useSharedState(sharedCount);

  return (
    <button onClick={() => setCount((count) => count + 1)}>{count}</button>
  );
}
1.0.2

7 months ago

1.0.1

7 months ago

1.0.0

8 months ago

1.0.3

7 months ago

0.0.10

1 year ago

0.0.9

1 year ago

0.0.8

1 year ago

0.0.5

1 year ago

0.0.7

1 year ago

0.0.6

1 year ago

0.0.4

1 year ago

0.0.3

2 years ago

0.0.2

2 years ago

0.0.1

2 years ago