# react-apiflow

> This repo is for getting started with React-Apiflow

Latest version **0.1.8** (published 2023-06-28) · MIT license · 0 weekly downloads

## Install

```sh
npm install react-apiflow
pnpm add react-apiflow
yarn add react-apiflow
bun add react-apiflow
```

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.8 |
| Published | 2023-06-28 |
| First published | 2023-06-28 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 12 |
| Unpacked size | 42.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | marstree |

## Links

- npm: https://www.npmjs.com/package/react-apiflow
- npm.io page: https://npm.io/package/react-apiflow

## Dependencies (12)

- [axios](https://npm.io/package/axios.md) ^1.4.0
- [react](https://npm.io/package/react.md) ^18.2.0
- [react-dom](https://npm.io/package/react-dom.md) ^18.2.0
- [web-vitals](https://npm.io/package/web-vitals.md) ^2.1.4
- [@types/jest](https://npm.io/package/@types/jest.md) ^27.5.2
- [@types/node](https://npm.io/package/@types/node.md) ^16.18.37
- [@types/react](https://npm.io/package/@types/react.md) ^18.2.14
- [react-scripts](https://npm.io/package/react-scripts.md) 5.0.1
- [@types/react-dom](https://npm.io/package/@types/react-dom.md) ^18.2.6
- [@testing-library/react](https://npm.io/package/@testing-library/react.md) ^13.4.0
- [@testing-library/jest-dom](https://npm.io/package/@testing-library/jest-dom.md) ^5.16.5
- [@testing-library/user-event](https://npm.io/package/@testing-library/user-event.md) ^13.5.0

## Recent versions

- 0.1.8 (latest) — 2023-06-28
- 0.1.7 — 2023-06-28
- 0.1.6 — 2023-06-28
- 0.1.5 — 2023-06-28
- 0.1.3 — 2023-06-28
- 0.1.1 — 2023-06-28
- 0.1.0 — 2023-06-28

## README

# Getting Started with React-Apiflow 
This repo is for getting started with React-Apiflow

## Installation 
please install the following packages:

```bash
npm install react-apiflow
```

## Usage 
### 1. Request API

The example code is as follows:
```javascript
import React from 'react';
import Apiflow, {ApiflowContext} from 'react-apiflow';

const Component = () => {

   // get API response from Apiflow
   const { response } = React.useContext(ApiflowContext);

    return (
      <>
        ...
        {/* call API with Apiflow and pass the API_ID*/}
        <Apiflow apiId="API_ID">
          <ul>
            {response?.data.map((item, index) => (
              <li key={index}>{item.name}</li>
            ))}
          </ul>
        </Apiflow>
        {/* script to call API */}
        ...
      </>
    );
}

export default Component;
```

---
_Source: https://npm.io/package/react-apiflow · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
