Skip to content

Latest commit

 

History

History

action-tracker

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 

React Native Embrace - Redux Tracker

Important

This module requires React Native Embrace SDK.

Embrace can collect basic session data and crashes as you've already seen in the Crash Reporting and Session Reporting sections. Embrace can also collect the actions that your app dispatched and its state (SUCCESS AND FAILED) Here's how you add the redux tracker to the session.

Install the component

yarn add @embrace-io/action-tracker

Or

npm install @embrace-io/action-tracker

Adding the component to your code

import { applyMiddleware, compose, configureStore } from "@reduxjs/toolkit";

// Import Embrace's Middleware
import { buildEmbraceMiddleware } from "@embrace-io/action-tracker";

// Create the Enhancer that applies Embrace's Middleware
const middlewareEnhancer = applyMiddleware(buildEmbraceMiddleware());

// Compose your Enhancers with Embrace's enhancer
const composedEnhancers = compose(middlewareEnhancer);
export default configureStore({
  // your reducers
  enhancers: [composedEnhancers],
});