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
{{ message }}
This repository was archived by the owner on Jul 12, 2023. It is now read-only.
`useFetch` is a React hook that supports the React 16.6 Suspense component implementation.
3
+
`useFetch` is a React hook that supports the React 16.6 Suspense component
4
+
implementation.
4
5
5
-
The design decisions and development process for this package are outlind in the Medium article [React Suspense with the Fetch API](https://medium.com/@Charles_Stover/react-suspense-with-the-fetch-api-a1b7369b0469).
6
+
The design decisions and development process for this package are outlind in
7
+
the Medium article
8
+
[React Suspense with the Fetch API](https://medium.com/@Charles_Stover/react-suspense-with-the-fetch-api-a1b7369b0469).
6
9
7
10
## Install
8
11
@@ -13,18 +16,54 @@ The design decisions and development process for this package are outlind in the
13
16
14
17
```JavaScript
15
18
importuseFetchfrom'fetch-suspense';
19
+
importReact, { Suspense } from'react';
16
20
17
-
// This fetching component will be delayed by
18
-
//Suspense until the fetch request resolves.
21
+
// This fetching component will be delayed by Suspense until the fetch request
22
+
// resolves.
19
23
// The return value of useFetch will be the response of the server.
0 commit comments