Naming Prosecution Mitigator

    @openreplay/tracker-redux

    3.0.0 • Public • Published

    OpenReplay Tracker Redux plugin

    A Redux middleware for OpenReplay Tracker. This middleware allows you to see the application state during session replay.

    Installation

    npm i @openreplay/tracker-redux

    Usage

    Initialize the @openreplay/tracker package as usual and load the plugin into it. Then put the generated middleware into your Redux chain.

    import { applyMiddleware, createStore } from 'redux';
    import Tracker from '@openreplay/tracker';
    import trackerRedux from '@openreplay/tracker-redux';
    
    const tracker = new Tracker({
      projectKey: YOUR_PROJECT_KEY,
    });
    
    const openReplayMiddleware = tracker.use(trackerRedux());
    
    const store = createStore(
      reducer,
      applyMiddleware(openReplayMiddleware),
    );

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

    trackerRedux({
      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;
      },
    })

    Install

    npm i @openreplay/tracker-redux

    DownloadsWeekly Downloads

    50

    Version

    3.0.0

    License

    MIT

    Unpacked Size

    26.1 kB

    Total Files

    19

    Last publish

    Collaborators

    • avatar
    • avatar