redux-reporter

npm version

Redux middleware for reporting actions to third party APIs. This package is extremely useful for analytics and error handling. Can be used with various APIs such as New Relic, Sentry, Adobe DTM, Keen

Installation

npm install --save redux-reporter

Usage

General Reporting

Create your reporting middleware

// /middleware/myReporter.js
import reporter from 'redux-reporter';

export default reporter(({ type, payload }, getState) => {

    try {
        // report to external API
    } catch (err) {}

});

Attach meta data to your actions

Configure store with your middleware

Reporting to Multiple APIs: You can report to multiple APIs by configuring multiple middlewares and attaching additional attributes to your actions

Example w/ New Relic

error reporting

User behavior (New Relic browser/insights)

Last updated

Was this helpful?