Skip to content
This repository has been archived by the owner on Sep 12, 2018. It is now read-only.

Commit

Permalink
updated docs
Browse files Browse the repository at this point in the history
  • Loading branch information
aprilmintacpineda committed Jun 29, 2018
1 parent a4eb563 commit 1ddf268
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,10 @@ export default connect(store => ({
})(Todos);
```

#### Callback on `store.updateStore`

`store.updateStore` has a second optional parameter which should be a `function` that will be run as callback of `setState`. This callback will receive the store's update state as it's only parameter. Please see [react's docs](https://reactjs.org/docs/react-component.html#setstate) about `setState`.

## How to handle async actions?

The package itself does not care how you handle this, you can use `async/await` if you like or stick to the chained `.then` of promises. But don't use generator functions as the store package was not equipped with it and supporting it is not an option because it would defeat the whole purpose of this library.
Expand Down

0 comments on commit 1ddf268

Please sign in to comment.