1.0.6 • Published 3 years ago

react-async-usefetch v1.0.6

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

react-async-usefetch

Purpose

Simple useFetch Hook.

Installation

npm i react-async-usefetch

or

yarn add react-async-usefetch

Usage

import usefetch from 'react-async-usefetch';

const { dataResponse, dataError, isDataLoading} = useFetch({ url, options, delay, returnDict: ["dataResponse", "dataError", "isDataLoading"]});

console.log("dataResponse: ", dataResponse);

console.log("dataError: ", dataError);

console.log("isDataLoading: ", isDataLoading);

Default function and return dict.

response: ["response", "error", "isLoading"]

fetch function: window.fetch
1.0.6

3 years ago

1.0.5

3 years ago

1.0.4

3 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago