Skip to content

Commit adacd34

Browse files
committed
πŸ“ fix documentation about UMD β†’ IIFE
1 parent dee4d45 commit adacd34

1 file changed

Lines changed: 7 additions & 3 deletions

File tree

β€ŽREADME.mdβ€Ž

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ yarn add react-async-task
1818

1919
### Installation from CDN
2020

21-
This module has an UMD bundle available through JSDelivr and Unpkg CDNs.
21+
This module has an IIFE bundle available through JSDelivr and Unpkg CDNs.
2222

2323
```html
2424
<!-- For UNPKG use the code below. -->
@@ -28,8 +28,12 @@ This module has an UMD bundle available through JSDelivr and Unpkg CDNs.
2828
<script src="https://cdn.jsdelivr.net/npm/react-async-task"></script>
2929

3030
<script>
31-
// UMD module is exposed through the "ReactAsyncTask" global variable.
32-
console.log(ReactAsyncTask);
31+
function useProductList() {
32+
// IIFE module is exposed through the "ReactAsyncTask" global variable.
33+
return ReactAsyncTask.useAsyncTask(fetchProductList);
34+
}
35+
36+
// ...
3337
</script>
3438
```
3539

0 commit comments

Comments
Β (0)