Deprecated
useFetch
is deprecated and will be removed in the next major version. See the documentation for more information. Custom hook for making HTTP requests and managing the state of the request.
import { useFetch } from "https://deno.land/x/netzo@0.5.70/deps/usehooks-ts.ts";
Examples
const { data, error } = useFetch('https://api.example.com/user');
const { data, error } = useFetch('https://api.example.com/user');
Parameters
optional
options: RequestInit- The options for the HTTP request (optional).