@capture.dev/redux
v0.0.5
Published
Redux middleware that automatically logs actions for bug reports created with [Capture.dev](https://capture.dev).
Maintainers
Readme
@capture.dev/redux
Redux middleware that automatically logs actions for bug reports created with Capture.dev.
Note: This middleware requires either the Capture.dev SDK or browser extension to submit bug reports. Install one of those first.
Installation
npm install @capture.dev/reduxUsage
Add the middleware to your Redux store:
import { configureStore } from "@reduxjs/toolkit";
import { captureReduxMiddleware } from "@capture.dev/redux";
export const store = configureStore({
reducer: rootReducer,
middleware: (getDefaultMiddleware) =>
getDefaultMiddleware().concat(captureReduxMiddleware),
});Once added, the middleware will automatically start recording actions that are performed on your Redux store.
How It Works
The middleware keeps a log of each action and its payload as it is dispatched, along with a snapshot of the state after the action has been performed.
When a user submits a bug report, Capture automatically includes these logs, allowing you to recreate the state of your store at any point during a session.
All logs are managed locally and no data is sent to Capture.dev unless a bug report is created.
What is Capture.dev?
Capture.dev is a bug reporting tool that captures screenshots, recordings, and technical context (console logs, network requests, and more) so developers can debug issues faster. This middleware adds Redux state history to that context.
