🚀 Big News:Socket Has Acquired Secure Annex.Learn More →
Socket
Book a DemoSign in
Socket

@dhairyasharma/react-native-compass

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@dhairyasharma/react-native-compass

Native android compass library for react-native

latest
Source
npmnpm
Version
1.0.1
Version published
Maintainers
1
Created
Source

@dhairyasharma/react-native-compass

Supports Android MIT License Maintenance Maintainer Generic badge

Twitter LinkedIn

Native android compass library for react-native

Only supports Android, for IOS work is in progress.

 

Getting started

Install the library using either Yarn:

yarn add @dhairyasharma/react-native-compass
yarn add react-native-shared-preferences@1.0.2

or npm:

npm install --save @dhairyasharma/react-native-compass
npm install --save eact-native-shared-preferences@1.0.2

or git:

npm install git+https://github.com/dhairya0907/react-native-compass.git
npm install git+https://github.com/sriraman/react-native-shared-preferences.git

Using React Native >= 0.60

  Linking the package manually is not required anymore with Autolinking.

 

Usage

Import the library

import { CompassModule, getDegree } from "@dhairyasharma/react-native-compass";

Get compass

<CompassModule style={{height : "100%", width : "100%"}} handHeight={270} />

// Here handHeight is the height of the hand in dp
// And the style is the style of the compass
// Try to call CompassModule in the end of the design, see example

Get the compass Degree

getDegree().then(degree => {
  console.log(degree);
});

NOTE

For detail usage see example.

 

Acknowledgements

 

Author

Dhairya Sharma | @dhairya0907

 

License

The library is released under the MIT license. For more information see LICENSE.

Keywords

react-native

FAQs

Package last updated on 02 Apr 2022

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