# react-async-popup

> An accessible promise based popup library for react, to reduce extra state management needed for popups.

Latest version **0.0.6** (published 2020-05-08) · MIT license · 0 weekly downloads

## Install

```sh
npm install react-async-popup
pnpm add react-async-popup
yarn add react-async-popup
bun add react-async-popup
```

## Health

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

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.6 |
| Published | 2020-05-08 |
| First published | 2020-05-04 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Node | >=10 |
| Dependencies | 0 |
| Unpacked size | 19.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 22 |
| Author | Aadil Hasan |
| Maintainers | aadil-hasan |
| Keywords | react-async-popup, react-popup, react-confirm, react-modal, rc-modal, rc-confirm |

## Links

- npm: https://www.npmjs.com/package/react-async-popup
- Repository: https://github.com/aadilhasan/react-async-popup
- Homepage: https://aadil.dev/react-async-popup
- Issues: https://github.com/aadilhasan/react-async-popup/issues
- npm.io page: https://npm.io/package/react-async-popup

## Alternatives

- [react-native-root-siblings](https://npm.io/package/react-native-root-siblings.md) — 102.9K weekly downloads
- [post-robot](https://npm.io/package/post-robot.md) — 93.7K weekly downloads
- [@praxisui/dialog](https://npm.io/package/@praxisui/dialog.md) — 2.0K weekly downloads
- [easy-toggle-state](https://npm.io/package/easy-toggle-state.md) — 350 weekly downloads
- [ngx-lightbox-evp](https://npm.io/package/ngx-lightbox-evp.md) — 19 weekly downloads

## Recent versions

- 0.0.6 (latest) — 2020-05-08
- 0.0.5 — 2020-05-08
- 0.0.4 — 2020-05-08
- 0.0.3 — 2020-05-08
- 0.0.2 — 2020-05-04
- 0.0.1 — 2020-05-04

## README

# react-async-popup

> A promise based popup (confirm and modal) library for react, to reduce extra state management needed for popups. checkout the docs here - https://aadil.dev/react-async-popup

## Install

```bash
npm install --save react-async-popup
```

or

```bash
yarn add react-async-popup
```

## Usage

```tsx
import React from 'react'

import { Confirm } from 'react-async-popup'

function App() {

  async function onDelete() {

    const { show } = await Confirm.new();

    const result = await show({
      title: ' Are you sure you want to delete the file ?'
    });

    if (result) {
      console.log(" Yes, Delete the file ")
    }else{
      console.log(" Don't delete ")
    }

  }

  return <button onClick={onDelete}> Delete File </button>
}
```
Find more examples here - https://aadil.dev/react-async-popup/examples

## License

MIT © [aadilhasan](https://github.com/aadilhasan)

---
_Source: https://npm.io/package/react-async-popup · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
