react-native-compass-heading
TypeScript icon, indicating that this package has built-in type declarations

1.5.0 • Public • Published

react-native-compass-heading

React Native module for iOS & Android to receive compass heading

Installation

npm install react-native-compass-heading

Usage

import CompassHeading from 'react-native-compass-heading';

  React.useEffect(() => {
    const degree_update_rate = 3;

    CompassHeading.start(degree_update_rate, ({heading, accuracy}) => {
      console.log('CompassHeading: ', heading, accuracy);
    });

    return () => {
      CompassHeading.stop();
    };
  }, []);

Contributing

See the contributing guide to learn how to contribute to the repository and the development workflow.

License

MIT


Made with create-react-native-library

Dependencies (0)

    Dev Dependencies (20)

    Package Sidebar

    Install

    npm i react-native-compass-heading

    Weekly Downloads

    34,659

    Version

    1.5.0

    License

    MIT

    Unpacked Size

    35.2 kB

    Total Files

    19

    Last publish

    Collaborators

    • firofame