react-rock 3.1.7 → 3.1.8
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/package.json +1 -1
- package/readme.md +2 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-rock",
|
|
3
|
-
"version": "3.1.
|
|
3
|
+
"version": "3.1.8",
|
|
4
4
|
"author": "Naxrul Ahmed",
|
|
5
5
|
"description": "React-Rock is a modern, lightweight state management library designed to simplify handling global state in React applications. With a minimal API and powerful features like freezing data updates for optimized re-renders, React-Rock allows you to manage state more efficiently while ensuring your app remains fast and responsive.",
|
|
6
6
|
"main": "./index.js",
|
package/readme.md
CHANGED
|
@@ -34,9 +34,9 @@ import { createStore } from 'react-rock';
|
|
|
34
34
|
type RowType = { name: string, age: number };
|
|
35
35
|
type MetaType = { anykey: any };
|
|
36
36
|
|
|
37
|
-
const
|
|
37
|
+
const default_rows = [{ name: '', age: 0 }]
|
|
38
38
|
// Create a store
|
|
39
|
-
const users = createStore<RowType, MetaType>(
|
|
39
|
+
const users = createStore<RowType, MetaType>(default_rows, { anykey: '' });
|
|
40
40
|
|
|
41
41
|
// Add a new row to the store
|
|
42
42
|
users.create({ name: 'John Doe', age: 30 });
|