@t8/react-pending 1.2.0 → 1.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -12,7 +12,7 @@ Self-contained async action state management for React apps
|
|
|
12
12
|
|
|
13
13
|
export let ItemList = () => {
|
|
14
14
|
let [items, setItems] = useState([]);
|
|
15
|
-
+ let { initial, pending, error, track } = usePendingState(
|
|
15
|
+
+ let { initial, pending, error, track } = usePendingState();
|
|
16
16
|
|
|
17
17
|
useEffect(() => {
|
|
18
18
|
- fetchItems().then(setItems);
|
|
@@ -90,7 +90,7 @@ Omit the custom string key parameter of `usePendingState()` to scope the pending
|
|
|
90
90
|
+ track(fetchItems(), { silent: true })
|
|
91
91
|
```
|
|
92
92
|
|
|
93
|
-
⬥ This option prevents the `pending` property from switching to `
|
|
93
|
+
⬥ This option prevents the `pending` property from switching to `true` in the pending state.
|
|
94
94
|
|
|
95
95
|
## Delayed pending state
|
|
96
96
|
|