2.0.0 • Published 6 months ago

@shared-state/react v2.0.0

Weekly downloads
-
License
MIT
Repository
github
Last release
6 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.2.0

6 months ago

2.0.0

6 months ago

1.1.0

1 year ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago

1.0.3

2 years ago

0.0.10

2 years ago

0.0.9

2 years ago

0.0.8

2 years ago

0.0.5

2 years ago

0.0.7

2 years ago

0.0.6

2 years ago

0.0.4

3 years ago

0.0.3

3 years ago

0.0.2

3 years ago

0.0.1

3 years ago