# @hooks2022/use-confirm

> React Hook to ask the user for a confirmation before executing a function.

Latest version **1.0.0** (published 2022-02-15) · MIT license · 0 weekly downloads

## Install

```sh
npm install @hooks2022/use-confirm
pnpm add @hooks2022/use-confirm
yarn add @hooks2022/use-confirm
bun add @hooks2022/use-confirm
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2022-02-15 |
| First published | 2022-02-15 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 1.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Maintainers | heejinkim |
| Keywords | react, hooks, confirm |

## Links

- npm: https://www.npmjs.com/package/@hooks2022/use-confirm
- Repository: https://github.com/heejinkim0812/react-hooks
- Homepage: https://github.com/heejinkim0812/react-hooks#readme
- Issues: https://github.com/heejinkim0812/react-hooks/issues
- npm.io page: https://npm.io/package/@hooks2022/use-confirm

## Dependencies (2)

- [react](https://npm.io/package/react.md) ^17.0.2
- [react-dom](https://npm.io/package/react-dom.md) ^17.0.2

## Alternatives

- [mobx-react](https://npm.io/package/mobx-react.md) — 2.8M weekly downloads
- [rc-tree](https://npm.io/package/rc-tree.md) — 2.6M weekly downloads
- [@react-oauth/google](https://npm.io/package/@react-oauth/google.md) — 1.3M weekly downloads
- [@wagmi/connectors](https://npm.io/package/@wagmi/connectors.md) — 877.0K weekly downloads
- [vee-validate](https://npm.io/package/vee-validate.md) — 836.4K weekly downloads

## Recent versions

- 1.0.0 (latest) — 2022-02-15

## README

# @hooks2022/use-confirm

React Hook to ask the user for a confirmation before executing a function.

## Installation

#### yarn

`yarn add @hooks2022/use-confirm`

#### npm

`npm i @hooks2022/use-confirm`

## Usage

```js
import React from "react";
import useConfirm from "@hooks2022/use-confirm";

function App() {
  const deleteWorld = () => console.log("Deleting world...");
  const confirmDelete = useConfirm("Are you sure?", deleteWorld);
  return <button onClick={confirmDelete}>Delete the world</button>;
}
```

---
_Source: https://npm.io/package/@hooks2022/use-confirm · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
