We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 45dd513 commit 70d2edbCopy full SHA for 70d2edb
README.md
@@ -52,11 +52,13 @@ React Easy State is a practical state management library with two functions and
52
import React from 'react';
53
import { store, view } from '@risingstack/react-easy-state';
54
55
-const counter = store({ num: 0 });
56
-const increment = () => counter.num++;
+const counter = store({
+ num: 0,
57
+ increment: () => counter.num++
58
+});
59
60
export default view(() => (
- <button onClick={increment}>{counter.num}</button>
61
+ <button onClick={counter.increment}>{counter.num}</button>
62
));
63
```
64
0 commit comments