open-index/open-npm huggingface dataset:
npm package: @gikdev/react-datapi
Description: A React hook for handling API requests with TypeScript support
Latest version: 1.0.1


# react-datapi

A React hook for handling API requests with TypeScript support.

[![npm](https://img.shields.io/npm/v/@gikdev/react-datapi)](https://npmjs.com/package/@gikdev/react-datapi)
[![Bundle Size](https://img.shields.io/bundlephobia/minzip/@gikdev/react-datapi)](https://bundlephobia.com/package/@gikdev/react-datapi)

## Install

```bash
npm install @gikdev/react-datapi
```

## Example Usage:

```typescript
import { useApiRequest } from '@gikdev/react-datapi'

const { data, loading, error, reload } = useApiRequest(() => ({
  url: '/todos',
  defaultValue: [],
}))
```