Skip to content

Commit

Permalink
Published version 4.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
mweststrate committed Mar 12, 2018
1 parent 1e7e044 commit 8353300
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
8 changes: 5 additions & 3 deletions README.md
Expand Up @@ -77,9 +77,9 @@ const myComponent = observer(({ fetchResult }) => {

const myComponent = observer(({ fetchResult }) =>
fetchResult.case({
pending: () => <div>Loading...</div>
rejected: error => <div>Ooops.. {error}</div>
fulfilled: value => <div>Gotcha: {value}</div>
pending: () => <div>Loading...</div>,
rejected: error => <div>Ooops.. {error}</div>,
fulfilled: value => <div>Gotcha: {value}</div>,
}))

// chain additional handler(s) to the resolve/reject:
Expand Down Expand Up @@ -473,6 +473,8 @@ autorun(() => {

## asyncAction

_deprecated_ this functionality can now be found as `flow` in the mobx package. However, `flow` is not applicable as decorator, where `asyncAction` still is.

`asyncAction` takes a generator function and automatically wraps all parts of the process in actions. See the examples below.
`asyncAction` can be used both as decorator or to wrap functions.

Expand Down
2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -88,4 +88,4 @@
"<rootDir>/node_modules/"
]
}
}
}

0 comments on commit 8353300

Please sign in to comment.