New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@angoralabs/angora-react-native

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@angoralabs/angora-react-native

Angora SDK React Native

  • 0.4.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1
decreased by-87.5%
Maintainers
1
Weekly downloads
 
Created
Source

Angora

React Native SDK

Installation

npm install @angoralabs/angora-react-native

or

yarn add @angoralabs/angora-react-native

Installation Dependencies

Angora's React Native SDK uses react-native-device-info.

After installing Angora's React Native SDK, you should also install react-native-device-info.

Usage

init

At the index.js, import angora from @angoralabs/angora-react-native and call the init function.

import {AppRegistry} from 'react-native';
import App from './App';
import {name as appName} from './app.json';
import {version as appVersion} from './package.json';
import {angora} from '@angoralabs/angora-react-native';

angora.init({
  token:
    'OGIyZTJmNGEtMzc4OS01NGE3LTg4ZTctZGJjMmVkZDU1MjdjOjIxODE4NzhmOGExNWEyM2YxOTI4MzFiMGEwYzRjZmUzZDFhNjIxNDM=',
  appName,
  appVersion,
});

AppRegistry.registerComponent(appName, () => App);

The init function expects and object containing:

  • token: your app key, which can be found on the integration session
  • appName: your app's name
  • appVersion: your app's version

AppState

Angora needs access to the AppState. At your root component, probably the App.js, add the AngoraAppState component, if it's a class component or just call the useAngoraAppState hooks, if it's a function component.

Function Component
import React, {useEffect} from 'react';

import {useAngoraAppState} from '@angoralabs/angora-react-native';

const App = () => {
  useAngoraAppState();

  return (
    // ...
  );
};

export default App;
Class Component
import React, {Component} from 'react';

import {AngoraAppState} from '@angoralabs/angora-react-native';

class App extends Component {

  render() {
    return (
      <AngoraAppState />
      // ...
    );
  }
};

export default App;

Attention

Without AngoraAppState or useAngoraAppState, the Angora React Native SDK won't be able to track sessions events.

Contributing

Not available yet.

License

MIT

Keywords

FAQs

Package last updated on 09 Aug 2020

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc