Skip to content

Commit dcff08b

Browse files
committed
Updates docs
1 parent a557058 commit dcff08b

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
[![Codecov](https://img.shields.io/codecov/c/github/ctrlplusb/easy-peasy.svg?style=flat-square)](https://codecov.io/github/ctrlplusb/easy-peasy)
1212

1313
```javascript
14-
import { StoreProvider, createStore, useStore, useAction } from 'easy-peasy';
14+
import { StoreProvider, createStore, useStore, useActions } from 'easy-peasy';
1515

1616
// 👇 create your store, providing the model
1717
const store = createStore({
@@ -36,7 +36,7 @@ const App = () => (
3636
function TodoList() {
3737
// 👇 use hooks to get state or actions
3838
const todos = useStore(state => state.todos.items)
39-
const add = useAction(dispatch => dispatch.todos.add)
39+
const add = useActions(actions => actions.todos.add)
4040
return (
4141
<div>
4242
{todos.map((todo, idx) => <div key={idx}>{todo}</div>)}

0 commit comments

Comments
 (0)