@storve/react 1.0.0 → 1.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md ADDED
@@ -0,0 +1,50 @@
1
+ # @storve/react
2
+
3
+ > React bindings for Storve — `useStore` and `useDevtools` hooks.
4
+
5
+ [![npm (scoped)](https://img.shields.io/npm/v/@storve/react.svg)](https://www.npmjs.com/package/@storve/react)
6
+ [![MIT License](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)
7
+ [![React](https://img.shields.io/badge/React-18%2B-61dafb)](https://react.dev/)
8
+
9
+ ## Installation
10
+
11
+ ```bash
12
+ npm install @storve/core @storve/react
13
+ # or
14
+ pnpm add @storve/core @storve/react
15
+ # or
16
+ yarn add @storve/core @storve/react
17
+ ```
18
+
19
+ **Peer dependencies:** `@storve/core`, `react` (18+)
20
+
21
+ ## Quick Start
22
+
23
+ ```tsx
24
+ import { createStore } from '@storve/core'
25
+ import { useStore } from '@storve/react'
26
+
27
+ const counterStore = createStore({ count: 0 })
28
+
29
+ function Counter() {
30
+ const count = useStore(counterStore, s => s.count)
31
+ return (
32
+ <button onClick={() => counterStore.setState(s => ({ count: s.count + 1 }))}>
33
+ Count: {count}
34
+ </button>
35
+ )
36
+ }
37
+ ```
38
+
39
+ ## API
40
+
41
+ - **`useStore(store, selector?)`** — Subscribe to a store. Uses `useSyncExternalStore` for React 18 compatibility.
42
+ - **`useDevtools(store)`** — Access `canUndo`, `canRedo`, `undo`, `redo` for stores enhanced with `withDevtools`.
43
+
44
+ ## Documentation
45
+
46
+ Full docs and examples: [GitHub - Nam1001/React-Flux](https://github.com/Nam1001/React-Flux)
47
+
48
+ ## License
49
+
50
+ MIT
@@ -1,5 +1,5 @@
1
- {"total": {"lines":{"total":89,"covered":89,"skipped":0,"pct":100},"statements":{"total":89,"covered":89,"skipped":0,"pct":100},"functions":{"total":3,"covered":3,"skipped":0,"pct":100},"branches":{"total":43,"covered":38,"skipped":0,"pct":88.37},"branchesTrue":{"total":0,"covered":0,"skipped":0,"pct":"Unknown"}}
1
+ {"total": {"lines":{"total":89,"covered":89,"skipped":0,"pct":100},"statements":{"total":89,"covered":89,"skipped":0,"pct":100},"functions":{"total":3,"covered":3,"skipped":0,"pct":100},"branches":{"total":42,"covered":37,"skipped":0,"pct":88.09},"branchesTrue":{"total":0,"covered":0,"skipped":0,"pct":"Unknown"}}
2
2
  ,"/Users/dipanshusrivastava/Desktop/React Flux/packages/storve-react/src/index.ts": {"lines":{"total":1,"covered":1,"skipped":0,"pct":100},"functions":{"total":0,"covered":0,"skipped":0,"pct":100},"statements":{"total":1,"covered":1,"skipped":0,"pct":100},"branches":{"total":0,"covered":0,"skipped":0,"pct":100}}
3
3
  ,"/Users/dipanshusrivastava/Desktop/React Flux/packages/storve-react/src/useDevtools.ts": {"lines":{"total":21,"covered":21,"skipped":0,"pct":100},"functions":{"total":1,"covered":1,"skipped":0,"pct":100},"statements":{"total":21,"covered":21,"skipped":0,"pct":100},"branches":{"total":8,"covered":3,"skipped":0,"pct":37.5}}
4
- ,"/Users/dipanshusrivastava/Desktop/React Flux/packages/storve-react/src/useStore.ts": {"lines":{"total":67,"covered":67,"skipped":0,"pct":100},"functions":{"total":2,"covered":2,"skipped":0,"pct":100},"statements":{"total":67,"covered":67,"skipped":0,"pct":100},"branches":{"total":35,"covered":35,"skipped":0,"pct":100}}
4
+ ,"/Users/dipanshusrivastava/Desktop/React Flux/packages/storve-react/src/useStore.ts": {"lines":{"total":67,"covered":67,"skipped":0,"pct":100},"functions":{"total":2,"covered":2,"skipped":0,"pct":100},"statements":{"total":67,"covered":67,"skipped":0,"pct":100},"branches":{"total":34,"covered":34,"skipped":0,"pct":100}}
5
5
  }
package/package.json CHANGED
@@ -1,6 +1,10 @@
1
1
  {
2
2
  "name": "@storve/react",
3
- "version": "1.0.0",
3
+ "repository": {
4
+ "type": "git",
5
+ "url": "https://github.com/Nam1001/React-Flux.git"
6
+ },
7
+ "version": "1.0.1",
4
8
  "main": "dist/index.cjs",
5
9
  "module": "dist/index.mjs",
6
10
  "types": "dist/index.d.ts",
@@ -20,7 +24,7 @@
20
24
  "lint": "eslint src --ext .ts,.tsx"
21
25
  },
22
26
  "dependencies": {
23
- "@storve/core": "1.0.0"
27
+ "@storve/core": "1.0.1"
24
28
  },
25
29
  "peerDependencies": {
26
30
  "react": ">=18.0.0"