forked from ava/use-http
 
 
 - 
  Notifications
 You must be signed in to change notification settings 
- Fork 0
Commit af73f5d
Ensure useFetch suspends when triggering a service call more than once
useFetch experimental support for React Suspense works great when the call made is only used once. In the event of an application successfully suspending after a service call, and then triggering that same call again, the suspense mechanism does not suspend as expected. This is because the suspenseStatus ref used to keep track of the suspense status is never reset! This change makes it so that when the suspense promise is created, the suspenseStatus ref is reset so that the promise can be successfully thrown for React to catch.1 parent 6225d32 commit af73f5d
1 file changed
+1
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
|  | |||
| 182 | 182 |  | |
| 183 | 183 |  | |
| 184 | 184 |  | |
| 185 | + | ||
| 185 | 186 |  | |
| 186 | 187 |  | |
| 187 | 188 |  | |
|  | |||
0 commit comments