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

@shankarmorwal/react-native-exit-on-double-press

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@shankarmorwal/react-native-exit-on-double-press

Custom hook that can be used to exit the app on double press. It uses small toaster inside. This will work only on android

  • 1.0.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

react-native-exit-on-double-press

Custom hook that can be used to exit the app on double press. It uses small toaster inside. This will work only on android.

Usage

import {useExitAppOnDoublePress} from "@shankarmorwal/react-native-exit-on-double-press";

then use it like this

useExitAppOnDoublePress({
        condition: true;
        message: "Press Again To Exit";
        timeout: 2000;
     });

This hook currently uses this options.

Condition: By default this is set to true. you can pass some custom condition. When this is false then this hook will not work.

message: It is custom message on first exit press

timeout: It is by default set to 2000 milli seconds. It will the duration between two double press to exit the app.

Keywords

FAQs

Package last updated on 20 Apr 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