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.1 to 0.0.2

4

package.json
{
"name": "react-hook-popup",
"version": "0.0.1",
"description": "Easily popups like alerts and modals in React with a single hook",
"version": "0.0.2",
"description": "Easily manage popups like alerts and modals in React with a single hook",
"homepage": "https://github.com/aidanjw1/react-hook-popup#readme",

@@ -6,0 +6,0 @@ "repository": "github:aidanjw1/react-hook-popup",

@@ -14,4 +14,19 @@ # React Hook Popup

### Basic Usage
React Hook Popup is completely centered around one single, simple to use hook: `usePopup`.
React Hook Popup is completely centered around one single, simple to use hook: `usePopup`. It can be imported like
```javascript
import { usePopup } from 'react-hook-popup';
```
Any component that uses this hook __must appear below the `<PopupProvider>` component__ in the tree. You probably want to wrap your whole application in this component.
```javascript
import { PopupProvider } from 'react-hook-popup';
```
```javascript
<PopupProvider>
<YourApplication />
</PopupProvider>
```
The `usePopup` hook takes two arguments:

@@ -18,0 +33,0 @@ - A `string` key that is unique to each popup.

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