@mhellams/mth-use-deferred-promise
TypeScript icon, indicating that this package has built-in type declarations

0.0.3 • Public • Published

MTH Use Deferred Promise

useDeferredPromise is a custom React hook that provides a simple mechanism to create deferred promises within a React functional component. This can be useful for delaying the resolution of a promise until a later time or when a specific event occurs. See this video

Installation

pnpm

pnpm add @mhellams/mth-use-deferred-promise

yarn

yarn add @mhellams/mth-use-deferred-promise

npm

npm install @mhellams/mth-use-deferred-promise

Import

ESM

import { useDeferredPromise } from '@mhellams/mth-use-deferred-promise';

CJS

const { useDeferredPromise } = require('@mhellams/mth-use-deferred-promise');

Usage

StackBlitz

Readme

Keywords

none

Package Sidebar

Install

npm i @mhellams/mth-use-deferred-promise

Weekly Downloads

0

Version

0.0.3

License

none

Unpacked Size

7 kB

Total Files

7

Last publish

Collaborators

  • mhellams