Skip to content

Commit f9caaa3

Browse files
committed
Update README.md
1 parent c278c21 commit f9caaa3

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

README.md

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,6 @@ assumptions about the shape of your data or the type of request.
2121
- Accepts `onResolved` and `onRejected` callbacks
2222
- Supports optimistic updates using `setData`
2323

24-
> This package is a work-in-progress. It has not yet been published on npm and its API may change before it's released.
25-
> Feel free to provide feedback.
26-
2724
## Rationale
2825

2926
`<Async>` is different in that it tries to resolve data as close as possible to where it will be used, while using a
@@ -35,11 +32,19 @@ configure any data fetching or updates on a higher (application global) level, u
3532
data on-demand and in parallel at component level instead of in bulk at the route / page level. It's entirely decoupled
3633
from your routes, so it works well in complex applications that have a dynamic routing model or don't use routes at all.
3734

35+
## Install
36+
37+
```
38+
npm install --save react-async
39+
```
40+
3841
## Usage
3942

4043
Using render props for ultimate flexibility:
4144

4245
```js
46+
import Async from "react-async"
47+
4348
const loadJson = () => fetch("/some/url").then(res => res.json())
4449

4550
const MyComponent = () => {
@@ -65,6 +70,8 @@ const MyComponent = () => {
6570
Using helper components (don't have to be direct children) for ease of use:
6671

6772
```js
73+
import Async from "react-async"
74+
6875
const loadJson = () => fetch("/some/url").then(res => res.json())
6976

7077
const MyComponent = () => {

0 commit comments

Comments
 (0)