New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

react-native-use-modal-hooks

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-native-use-modal-hooks - npm Package Compare versions

Comparing version 1.2.0 to 1.3.0

2

package.json
{
"name": "react-native-use-modal-hooks",
"description": "React hooks for displaying a modal window in React Native",
"version": "1.2.0",
"version": "1.3.0",
"main": "dist/index.js",

@@ -6,0 +6,0 @@ "types": "dist/index.d.ts",

@@ -14,3 +14,3 @@ # react-native-use-modal-hooks

## Demo
![demo](https://user-images.githubusercontent.com/32378535/89108919-b28cf380-d477-11ea-8596-8b05f3988aa6.gif)
![demo](https://user-images.githubusercontent.com/32378535/89127880-46b89280-d52c-11ea-92fb-52c650f6d1c3.gif)

@@ -22,6 +22,27 @@ ## How to install

- Use ModalProvider to provide modal context for your application:
```
import React from 'react'
import { NavigationContainer } from '@react-navigation/native';
import { ModalProvider } from "react-native-use-modal-hooks";
const App: React.FC = () => {
return (
<ModalProvider>
<NavigationContainer>
{/* Screen configuration */}
</NavigationContainer>
</ModalProvider>
)
}
export default App
```
- Call useModal with the dialog component of your choice.
```
import React from 'react'
import { View, Text, StyleSheet, Modal, TouchableHighlight, Button } from 'react-native'
import { useModal } from '../src';
import { useModal } from 'react-native-use-modal-hooks';

@@ -96,2 +117,2 @@ const styles = StyleSheet.create({

}
```
```
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