context-scoped-state 0.0.4 → 0.0.5

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.
Files changed (2) hide show
  1. package/README.md +4 -5
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -62,13 +62,13 @@ export const useCounterStore = createStoreHook(CounterStore);
62
62
  import { useCounterStore } from './stores/counterStore';
63
63
 
64
64
  function Counter() {
65
- const store = useCounterStore();
65
+ const counterStore = useCounterStore();
66
66
 
67
67
  return (
68
68
  <div>
69
- <span>{store.state.count}</span>
70
- <button onClick={() => store.increment()}>+</button>
71
- <button onClick={() => store.decrement()}>-</button>
69
+ <span>{counterStore.state.count}</span>
70
+ <button onClick={() => counterStore.increment()}>+</button>
71
+ <button onClick={() => counterStore.decrement()}>-</button>
72
72
  </div>
73
73
  );
74
74
  }
@@ -179,7 +179,6 @@ No mocking libraries. No global state cleanup. Just render with the state you ne
179
179
  - Building reusable components with internal state
180
180
  - You want test isolation without extra setup
181
181
  - State naturally belongs to a subtree, not the whole app
182
- - You prefer OOP patterns (classes, methods)
183
182
 
184
183
  **Need global state?** Just place the Context at your app root — same API, app-wide access.
185
184
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "context-scoped-state",
3
- "version": "0.0.4",
3
+ "version": "0.0.5",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "repository": {