File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -97,15 +97,15 @@ const MyComponent = () => (
97
97
Creating a custom instance of Async, bound to a specific promiseFn:
98
98
99
99
``` js
100
- import { createInstance } from ' react-async'
100
+ import { createInstance } from " react-async"
101
101
102
- const loadCustomer = id => fetch (` /api/customers/ ${ id } ` ).then (... )
102
+ const loadCustomer = () => fetch (" /api/customer " ).then (... )
103
103
104
104
const AsyncCustomer = createInstance ({ promiseFn: loadCustomer })
105
105
106
106
const MyComponent = () => (
107
107
< AsyncCustomer>
108
- < AsyncCustomer .Resolved > {customer => ` Hello ${ customer .name } ` }< / CustomerLoader .Resolved >
108
+ < AsyncCustomer .Resolved > {customer => ` Hello ${ customer .name } ` }< / AsyncCustomer .Resolved >
109
109
< / AsyncCustomer>
110
110
)
111
111
```
You can’t perform that action at this time.
0 commit comments