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

Execute And Watch Async Function In React

This is a React hook for handling asynchronous tasks, such as backend API calls.

How to use it:

1. Install and import the react-async-watcher.

# Yarn
$ yarn add react-async-watcher

# NPM
$ npm i react-async-watcher
import { useAsyncWatcher } from 'react-async-watcher';

2. Basic usage:

const { execute, reset, status, result, error } = useAsyncWatcher()
execute(async () => {
  // do whatever you want
})

Preview:

Execute And Watch Async Function In React

Download Details:

Author: xralphack

Live Demo: View The Demo

Download Link: Download The Source Code

Official Website: https://github.com/xralphack/react-async-watcher

License: MIT

Credit: Source link

Previous Next
Close
Test Caption
Test Description goes like this