Socket
Socket
Sign inDemoInstall

react-hook-popup

Package Overview
Dependencies
6
Maintainers
1
Versions
17
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.0.4 to 0.0.5-alpha

11

dist/PopupProvider.js

@@ -43,3 +43,3 @@ "use strict";

if (previous[key]) {
throw Error("Alerts were created with duplicate key: '" + key + "'");
return previous;
}

@@ -53,5 +53,2 @@ return __assign(__assign({}, previous), (_a = {}, _a[key] = {

var removePopup = function (key) {
if (!popups[key]) {
throw Error("Attempted to remove non-existing alert with key: " + key);
}
setPopups(function (previous) {

@@ -64,4 +61,6 @@ var updatedPopups = __assign({}, previous);

var displayPopup = function (key, message) {
var _a;
setPopups(__assign(__assign({}, popups), (_a = {}, _a[key] = __assign(__assign({}, popups[key]), { open: true, message: message }), _a)));
setPopups(function (previous) {
var _a;
return (__assign(__assign({}, previous), (_a = {}, _a[key] = __assign(__assign({}, popups[key]), { open: true, message: message }), _a)));
});
};

@@ -68,0 +67,0 @@ var closePopup = function (key) {

@@ -1,6 +0,3 @@

declare type ReturnType = [
(message: string) => void,
() => void
];
declare type ReturnType = [(message: string) => void, () => void];
export declare function usePopup(key: string, popupRenderer: PopupRenderer): ReturnType;
export {};
{
"name": "react-hook-popup",
"version": "0.0.4",
"version": "0.0.5-alpha",
"description": "Easily manage popups like alerts and modals in React with a single hook",

@@ -5,0 +5,0 @@ "homepage": "https://github.com/aidanjw1/react-hook-popup#readme",

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc