@react-native-embrace/action-tracker
TypeScript icon, indicating that this package has built-in type declarations

0.2.12 • Public • Published

React Native Embrace - Redux Tracker

Core Module Required

This module requires React Native Embrace SDK.

Add React Redux Tracker

Adding Context to Sessions

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.

Adding the component

Embrace has a separate module for tracking Redux's Actions, to use it you will need to add the React Redux Tracker

Install the component

yarn add @react-native-embrace/action-tracker
npm install @react-native-embrace/action-tracker

Adding the component to your code

Add an useRef for the NavigationContainer and pass it to Embrace's hook

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

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

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

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

Readme

Keywords

none

Package Sidebar

Install

npm i @react-native-embrace/action-tracker

Homepage

embrace.io/

Weekly Downloads

40

Version

0.2.12

License

ISC

Unpacked Size

6.13 kB

Total Files

7

Last publish

Collaborators

  • fnewberg
  • themutsi