Skip to content

Commit 21bced1

Browse files
committed
tweak docs
1 parent 4f29ab5 commit 21bced1

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -433,7 +433,8 @@ import { view, store } from 'react-easy-state'
433433

434434
export default view(() => {
435435
const counter = store({ num: 0 })
436-
return <button={() => counter.num++}>{counter.num}</div>
436+
const increment = () => counter.num++
437+
return <button={increment}>{counter.num}</div>
437438
})
438439
```
439440

0 commit comments

Comments
 (0)