dev-react-microstore 1.0.0 → 1.0.3

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 +14 -9
  2. package/package.json +31 -31
package/README.md CHANGED
@@ -48,8 +48,9 @@ const taskStore = createStoreState({
48
48
  function TaskList() {
49
49
  // Only re-render when task completion status changes
50
50
  const { tasks } = useStoreSelector(taskStore, [
51
- { tasks: (prev, next) =>
52
- prev.some(t => t.completed) !== next.some(t => t.completed)
51
+ {
52
+ tasks: (prev, next) =>
53
+ !prev.some((task, i) => task.id === next?.[i]?.id && task.completed !== next[i].completed)
53
54
  }
54
55
  ]);
55
56
 
@@ -162,13 +163,17 @@ npm install --save-dev eslint-plugin-react-microstore
162
163
 
163
164
  ESLint configuration:
164
165
 
165
- ```json
166
- {
167
- "plugins": ["react-microstore"],
168
- "rules": {
169
- "react-microstore/no-unused-selector-keys": "warn"
170
- }
171
- }
166
+ ```tsx
167
+ import reactMicrostore from 'eslint-plugin-react-microstore';
168
+
169
+ const eslintConfig = [{
170
+ "plugins": {
171
+ "react-microstore": reactMicrostore
172
+ },
173
+ "rules": {
174
+ "react-microstore/no-unused-selector-keys": "warn"
175
+ }
176
+ }]
172
177
  ```
173
178
 
174
179
  `react-microstore/no-unused-selector-keys`
package/package.json CHANGED
@@ -1,32 +1,32 @@
1
- {
2
- "name": "dev-react-microstore",
3
- "version": "1.0.0",
4
- "description": "A minimal global state manager for React with fine-grained subscriptions.",
5
- "main": "dist/index.js",
6
- "types": "dist/index.d.ts",
7
- "scripts": {
8
- "build": "tsup src/index.ts --format esm,cjs --dts --minify",
9
- "prepare": "npm run build"
10
- },
11
- "keywords": [
12
- "react",
13
- "state",
14
- "store",
15
- "microstore",
16
- "selector",
17
- "hook",
18
- "tiny",
19
- "minimal"
20
- ],
21
- "author": "Ohad Baehr",
22
- "license": "MIT",
23
- "peerDependencies": {
24
- "react": ">=17.0.0",
25
- "react-dom": ">=17.0.0"
26
- },
27
- "devDependencies": {
28
- "@types/react": "^19.1.2",
29
- "tsup": "^8.4.0",
30
- "typescript": "^5.8.3"
31
- }
1
+ {
2
+ "name": "dev-react-microstore",
3
+ "version": "1.0.3",
4
+ "description": "A minimal global state manager for React with fine-grained subscriptions.",
5
+ "main": "dist/index.js",
6
+ "types": "dist/index.d.ts",
7
+ "scripts": {
8
+ "build": "tsup src/index.ts --format esm,cjs --dts --minify",
9
+ "prepare": "npm run build"
10
+ },
11
+ "keywords": [
12
+ "react",
13
+ "state",
14
+ "store",
15
+ "microstore",
16
+ "selector",
17
+ "hook",
18
+ "tiny",
19
+ "minimal"
20
+ ],
21
+ "author": "Ohad Baehr",
22
+ "license": "MIT",
23
+ "peerDependencies": {
24
+ "react": ">=17.0.0",
25
+ "react-dom": ">=17.0.0"
26
+ },
27
+ "devDependencies": {
28
+ "@types/react": "^19.1.2",
29
+ "tsup": "^8.4.0",
30
+ "typescript": "^5.8.3"
31
+ }
32
32
  }