Skip to content

Commit 1f69af5

Browse files
committed
Fix example.
1 parent 8008efa commit 1f69af5

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -97,15 +97,15 @@ const MyComponent = () => (
9797
Creating a custom instance of Async, bound to a specific promiseFn:
9898

9999
```js
100-
import { createInstance } from 'react-async'
100+
import { createInstance } from "react-async"
101101

102-
const loadCustomer = id => fetch(`/api/customers/${id}`).then(...)
102+
const loadCustomer = () => fetch("/api/customer").then(...)
103103

104104
const AsyncCustomer = createInstance({ promiseFn: loadCustomer })
105105

106106
const MyComponent = () => (
107107
<AsyncCustomer>
108-
<AsyncCustomer.Resolved>{customer => `Hello ${customer.name}`}</CustomerLoader.Resolved>
108+
<AsyncCustomer.Resolved>{customer => `Hello ${customer.name}`}</AsyncCustomer.Resolved>
109109
</AsyncCustomer>
110110
)
111111
```

0 commit comments

Comments
 (0)