d

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore.

15 St Margarets, NY 10033
(+381) 11 123 4567
ouroffice@aware.com

 

KMF

Dead Simple Data Fetcher For React

A dead simple data fetcher for React app.

How to use it:

1. Install and import the Data Fetcher.

# NPM
$ npm i use-promise-result --save

import { usePromiseResult } from "use-promise-result";

2. Basic usage.

const dataProvider = async () => {
  return (await axios.get("/path/to/provider/")).data;
};
function App() {
  const { data, error, loading, success, reload } =
    usePromiseResult(dataProvider);
  // ...
}

Preview:

Dead Simple Data Fetcher For React

Download Details:

Author: lekhasy

Live Demo: View The Demo

Download Link: Download The Source Code

Official Website: https://github.com/lekhasy/use-promise-result

License: MIT

Credit: Source link

Previous Next
Close
Test Caption
Test Description goes like this