National Party Month

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

    1.4.2 • Public • Published

    react-native-compass-heading

    React Native module for iOS & Android to receive compass heading

    Installation

    $ yarn add react-native-compass-heading
    $ npx pod-install

    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();
        };
      }, []);

    Acknowledgements

    Thanks to the authors of react-native-simple-compass for inspiration

    Keywords

    Install

    npm i react-native-compass-heading

    DownloadsWeekly Downloads

    3,023

    Version

    1.4.2

    License

    MIT

    Unpacked Size

    25.2 kB

    Total Files

    17

    Last publish

    Collaborators

    • firofame