Skip to content

Commit 7632f9c

Browse files
authored
Update README.md
1 parent edaa00c commit 7632f9c

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,10 @@ function App() {
3333
body: {}, // whatever data you want to send
3434
}
3535

36-
const [data, loading, error] = useFetch('https://example.com', options)
36+
var [data, loading, error] = useFetch('https://example.com', options)
37+
38+
// want to use object destructuring? You can do that too like:
39+
var { data, loading, error } = useFetch('https://example.com', options)
3740

3841
if (error) {
3942
return 'Error!'

0 commit comments

Comments
 (0)