Embrace gathers the information needed to identify issues and measure performance automatically upon integration. The following React Native guide provides simple instruction on how to call the relevant functions so teams can be provided much needed additional context (logs and user info) and measure the timing of key areas of their app explicitly (moments).
For additional info please refer to the React Native Guide.
Only an Embrace App ID and an Embrace API Token.
If you need an App ID and API Token, Go to our dashboard to create an account.
NPM
npm install @embrace-io/react-native
YARN
yarn add @embrace-io/react-native
The JavaScript Embrace SDK ships with a setup script to modify the files in your
project to add the native dependencies. The setup scripts can be found in your
node_modules
folder at node_modules/@embrace-io/react-native/lib/scripts/setup
Run the setup script
node node_modules/@embrace-io/react-native/lib/scripts/setup/installAndroid.js
node node_modules/@embrace-io/react-native/lib/scripts/setup/installIos.js
You can use git to see the changes that the script made.
git diff
Initialize method applies the necessary listener to your application. This allow Embrace to track javascript errors, check js bundle changes (if you use OTA), track js patch and react native versions.
import { initialize } from "@embrace-io/react-native";
type Props = {};
export default class App extends Component<Props> {
componentDidMount() {
initialize();
}
}