Skip to content

Commit

Permalink
Add missing async keyword in README example (#189)
Browse files Browse the repository at this point in the history
  • Loading branch information
marvinhagemeister committed May 24, 2020
1 parent b08e0c5 commit dd919e5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -105,7 +105,7 @@ let actionFunctions = store => ({

// Remember that the state passed to the action function could be stale after
// doing async work, so use getState() instead:
incrementAfterStuff(state) {
async incrementAfterStuff(state) {
const res = await fetch('foo.json')
const resJson = await res.json()
// the variable 'state' above could now be old,
Expand Down

0 comments on commit dd919e5

Please sign in to comment.