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
Copy file name to clipboardExpand all lines: README.md
+122-5Lines changed: 122 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -1,19 +1,19 @@
1
1
# Better Fetch
2
2
3
-
A fetch wrapper for typescript that returns data and error object. Works on the browser, node (version 18+), workers, deno and bun. Some of the APIs are inspired by [ofetch](https://github.com/unjs/ofetch).
3
+
A fetch wrapper for typescript that returns data and error object, supports defined route schemas, plugins and more. Works on the browser, node (version 18+), workers, deno and bun.
//data and error types are inferred from fetch call
76
116
```
77
117
118
+
119
+
### ♯ Using with React
120
+
To use better fetch with React hooks, you have the option to import createReactFetch. This allows you to create hooks with custom defaults. Alternatively, you can directly import each individual hook.
121
+
122
+
123
+
With createReactFetch, you can create hooks with custom defaults.
0 commit comments