JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 3884
  • Score
    100M100P100Q115468F
  • License MIT

Torch/flashlight for react-native

Package Exports

  • react-native-torch

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (react-native-torch) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

react-native-torch

npm version

A simple React Native plugin to switch a flashlight on/off.

Currently supports both iOS (>= 8.0) and Android (>= 6.0 Marshmallow) platforms.

Install

npm install --save react-native-torch
react-native link react-native-torch

Usage

import Torch from 'react-native-torch';

Torch.switchState(true) // Turn ON
Torch.switchState(false) // Turn OFF

A demo application TorchDemo is also available.