Skip to content
On this page

useRequest

Fetch data with more complete logic

Usage

ts
import { useRequest } from '@use-kit/react-hooks'

const { loading, result, error } = useRequest(fetch('api/data'))
import { useRequest } from '@use-kit/react-hooks'

const { loading, result, error } = useRequest(fetch('api/data'))

Released under the MIT License.