dev-react-microstore 1.0.2 → 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 +3 -2
  2. package/package.json +1 -1
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
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dev-react-microstore",
3
- "version": "1.0.2",
3
+ "version": "1.0.3",
4
4
  "description": "A minimal global state manager for React with fine-grained subscriptions.",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",