@amplitude/react-native
Official Amplitude React Native SDK
! v2 of this SDK is newly developed and has just been released. Please file any bug reports under issues. PR's welcome!
Installation
yarn add @amplitude/react-native
Documentation
Exported Modules
Usage
import * as React from 'react';
import { Button } from 'react-native';
import { Amplitude, Identify } from '@amplitude/react-native';
const ampInstance = Amplitude.getInstance();
ampInstance.init(API_KEY);
export function MyApp() {
return (
<Button
title="Log Event"
onPress={() => ampInstance.logEvent('BUTTON_CLICKED')}
/>
);
}
Contributing
See the contributing guide to learn how to contribute to the
repository and the development workflow.
License
MIT