diff --git a/README.md b/README.md index 2329d1d..f47561c 100644 --- a/README.md +++ b/README.md @@ -35,3 +35,10 @@ const ExampleWithAsync = (props) => {return ``` Much simpler, especially if your component is read-only, like the example. + +## [Available props](https://github.com/capaj/react-async/blob/master/async.js#L48): + +- *promise* a promise you want to wait for +- *then* runs when promise is resolved. Async will run function provided in it's render passing a resolved value as first parameter. +- *catch* runs when promise is rejected. Async will run function provided in it's render passing an error as first parameter. +- *pendingRender*(optional) is a node which will be outputted from Async render method while promise is pending. If none is provided, defaults to `
`