react-native-stop-app
TypeScript icon, indicating that this package has built-in type declarations

0.1.31 • Public • Published

React Native Stop App

Simple library for stopping app and killing it's current process.

Getting started

$ npm install react-native-stop-app --save or $ yarn add react-native-stop-app React Native Stop APP Module help us stop application work on Android, IOS

Usage

React Native version 0.64+ should handle linking automatically and usage is really simple as shown on the example.

⬇️

import { stopApp } from 'react-native-stop-app';
const stopAppOnPress = () => stopApp();

You can also import TestButton for simple testing.
Here is an example component that you can easily use for testing.

import React from 'react'
import { StyleSheet, View } from 'react-native'
import { TestButton } from 'react-native-stop-app'

const StopAppExample = () => {
  return <View style={styles.container}>
        <TestButton />
    </View>
}

const styles = StyleSheet.create({
  container: {
    flex: 1,
    alignItems: 'center',
    justifyContent: 'center',
    height: 400,
  },
})

export default StopAppExample

Package Sidebar

Install

npm i react-native-stop-app

Weekly Downloads

1

Version

0.1.31

License

MIT

Unpacked Size

886 kB

Total Files

159

Last publish

Collaborators

  • hellsten