An open API service indexing awesome lists of open source software.

https://github.com/oussamamessaoudi/fetch-react


https://github.com/oussamamessaoudi/fetch-react

axios fetch javascript react react-native reactjs superagent typescript

Last synced: 3 months ago
JSON representation

Awesome Lists containing this project

README

          

# fetch-react

Fetching data using React Component.

## Installation

Add dependency to your project.
```sh
npm install @react-items/fetch --save
```

## Quick Start

```jsx
import React from 'react';
import Fetch, {Error, FetchContext, Success} from '@react-items/fetch';

const defaultValues = {
Loading:

Loading
,
NotConnected: (response, status, httpStatus) => (

NotConnected

{JSON.stringify(response)}

{status}

{httpStatus}


)
};

const App = () => (



{(response, status, httpStatus) =>


Success

{JSON.stringify(response)}

{status}

{httpStatus}


}


{(response, status, httpStatus) =>

Error

{JSON.stringify(response)}

{status}

{httpStatus}


}



);
```
# Author

Oussama MESSAOUDI - [@Oussama Messaoudi](https://github.com/oussamamessaoudi/)