/ react native

HyperTrack now supports React Native

Over the last few years in the fast evolving Javascript ecosystem React has emerged as one of the top libraries for building UI. Described as the “View in MVC” it provides a high-performance way to keep views up-to-date with JavaScript using its incredibly fast virtual DOM diff algorithm and one way data flows: from owner to child. Since its launch React has redefined a lot of paradigms  by bringing fresh new take on web development.

Launch of React Native last year brought the power of React to native development allowing developers to write React Components and generate genuine native interface using JavaScript.

Using JavaScript to build mobile apps is not a new idea. Frameworks like Ionic and PhoneGap have taken on the promise of cross-platform native apps driven by JavaScript and gained a fair amount of developer and community support.  Unfortunately since it’s either just wrapping a web app in a WebView or trying to mimic HTML & CSS which is hard to build apps with it doesn’t produce a truly native user experience. Additionally interfacing directly with native objects all the time results in a big performance hit.

With React Native the application logic is written and run in JavaScript whereas the application UI is rendered using actual native views; so there are none of the compromises typically associated with HTML5 UI. React Native apps use truly native APIs and UI components which means the apps feel and work like any other traditional native app. The components are pure side-effect-free functions and return what the views look like at any point in time.  This is exciting because it opens new doors for experimentation across platforms without having to learn entire new languages and development ecosystems.

React Native wrapper for HyperTrack SDKs

With the increasing number of sign-ups for HyperTrack we started getting requests from developers for React Native support. Providing developers easy ways to include location features in their apps is of utmost importance to us. With that in mind we are excited to release the React Native wrapper for the HyperTrack SDK. Our lightweight open-source SDKs collect and beam up battery-optimized and time-aware location streams that work across devices and network conditions.

To integrate the SDK into your React Native app follow the below steps:

1) In your project directory install and link the module package from npm.

2) Setup the SDKs for target platforms – [Android](https://github.com/hypertrack/react-native-hypertrack#android-setup) / [iOS](https://github.com/hypertrack/react-native-hypertrack#ios-setup).
  1. Import and initialize the SDK with your Publishable key.
4) Go ahead and start making HyperTrack SDK API calls. For example
The [Readme on Github](https://github.com/hypertrack/react-native-hypertrack/blob/master/README.md#usage) details out the usage and all available APIs. The [Example App](https://github.com/hypertrack/example-react-native/) will help you see the wrapper in action.

We are excited to see what location features you build in your React Native app using our SDK. Feel free to write to us at help@hypertrack.io and we would love to feature your app on our blog. If you have issues or feature requests use issues tracker. We’d love to see your pull requests so send them in. Also if you are developing your app on any other platform that is not yet officially supported by us let us know. We will be glad to roll out a support for the platform of your choice!

*Have questions suggestions? Join the discussion on slack. *Like what we are doing? Sign up to use HyperTrack and build location features!