ngrx middleware

Logging actions and state in your ngrx apps

The logrocket-ngrx package augments LogRocket sessions to include actions and state from your ngrx store. The middleware is compatible with ngrx v4+.

To use LogRocket with ngrx, install the logrocket-ngrx middleware: npm i --save logrocket-ngrx

import createNgrxMiddleware from 'logrocket-ngrx';

// opts is the same object you would normally pass to LogRocket.reduxMiddleware()
const logrocketMiddleware = createNgrxMiddleware(LogRocket, opts);

// in your module imports, add the middleware
const reducers = { ... }; // your app reducers
const metaReducers = [logrocketMiddleware];
StoreModule.forRoot(reducers, { metaReducers })

Configuration options are identical to reduxMiddleware().

Session Filtering

This plugin is implemented by wrapping our Redux middleware. Therefore you can filter over sessions containing ngrx state changes using the redux action type filter. In the log entry pane in the session view they will appear under the redux label.

Updated about a year ago

ngrx middleware


Logging actions and state in your ngrx apps

Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.