use-fetch
Fetch data with built-in loading and error states
Source
Docs
Package
Usage
useFetch
hook sends a fetch request to the specified URL and returns the response data, loading state, error,
refetch
and abort
functions. You can pass other parameters that fetch takes like method, headers etc.
Fetching
Definition
Exported types
UseFetchOptions
and UseFetchReturnValue
types are exported from @mantine/hooks
package,
you can import them in your application: