You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The _Delayed_ component uses _usePromiseSuspensible_ to call a promise that resolves with an array of number or reject: if promise has been resolved, array number is rendered, otherwise an alert is invocked. Delayed component is returned from _UsePromiseSuspensible_ component.
5
+
The _Delayed_ component uses _usePromiseSuspensible_ hook to call a promise that resolves with an array of number or reject: if promise has been resolved, array number is rendered, otherwise an alert is invocked. Delayed component is returned from _UsePromiseSuspensible_ component.
Hook to use [Fetch API](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API) with more control and the possibility to execute request with suspense support.
> The _Delayed_ component uses _usePromiseSuspensible_ to call a promise that resolves with an array of number or reject: if promise has been resolved, array number is rendered, otherwise an alert is invocked. Delayed component is returned from _UsePromiseSuspensible_ component.
29
+
> The _Delayed_ component uses _usePromiseSuspensible_hook to call a promise that resolves with an array of number or reject: if promise has been resolved, array number is rendered, otherwise an alert is invocked. Delayed component is returned from _UsePromiseSuspensible_ component.
* **`useFetch`**: Hook to use [Fetch API](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API) with more control and the possibility to execute request with suspense support.
5
+
* @param {RequestInfo|URL} url - The resource that you wish to fetch. This can either be a string, a Request object or an URL object.
6
+
* @param {Object} [options] - An object containing any custom settings you want to apply to the fetch invokation.
7
+
* @param {RequestInit} [...options.rest] - properties to customize fetch settings.
8
+
* @param {(loading: boolean)=>void} [options.onLoading] - function that will be executed when loading state changes.
9
+
* @param {(error:unknown)=>void} [options.onError] - function that will be executed when error occurred.
10
+
* @param {boolean} [options.suspensable] - boolean that indicates if fetch request need to be suspends or not.
0 commit comments