Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@openreplay/tracker-ngrx

Package Overview
Dependencies
Maintainers
4
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@openreplay/tracker-ngrx

Tracker plugin for NgRx state recording

  • 3.4.9
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
57
decreased by-30.49%
Maintainers
4
Weekly downloads
 
Created
Source

OpenReplay Tracker NgRx plugin

A NgRx meta-reducer for OpenReplay Tracker. This plugin allows you to see the application state during session replay.

Installation

npm i @openreplay/tracker-ngrx

Usage

Initialize the @openreplay/tracker package as usual and load the plugin into it. Then put the generated meta-reducer into your imports. See NgRx documentation for details.

import { StoreModule } from '@ngrx/store';
import { reducers } from './reducers';
import Tracker from '@openreplay/tracker';
import trackerNgRx from '@openreplay/tracker-ngrx';

const tracker = new Tracker({
  projectKey: YOUR_PROJECT_KEY,
});

const metaReducers = [tracker.plugin(trackerNgRx())];

@NgModule({
  imports: [StoreModule.forRoot(reducers, { metaReducers })],
})
export class AppModule {}

You can customize the middleware behavior with options to sanitize your data.

trackerNgRx({
  actionFilter: action => action.type !== 'DRAW', // only actions which pass this test will be recorded
  actionTransformer: action => action.type === 'LOGIN' ? null : action,
  actionType: action => action.type // action type for search, that's the default one
  stateTransformer: state => {
    const { jwt, ..._state } = state;
    return _state;
  },
})

Keywords

FAQs

Package last updated on 13 Sep 2022

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