Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

react-async-popup

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-async-popup

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

  • 0.0.6
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
25
decreased by-35.9%
Maintainers
1
Weekly downloads
 
Created
Source

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

npm install --save react-async-popup

or

yarn add react-async-popup

Usage

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

Keywords

FAQs

Package last updated on 08 May 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc