Security News
Weekly Downloads Now Available in npm Package Search Results
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
redux-reporter
Advanced tools
Redux middleware for reporting actions to third party APIs. Extremely useful for analytics and error handling.
npm install --save redux-reporter
// todo
import reporter from './reporter';
export default reporter(({ type, payload }, getState) => {
try {
// report to external API
} catch (err) {
console.error(err);
}
});
// /actions/MyActions.js
export function myAction() {
let type = 'MY_ACTION';
return {
type,
meta: {
report: {
type,
payload: 'example payload'
}
}
};
}
import reporter from './reporter';
const select = ({ meta = {} }) => meta.analytics;
export default reporter(({ type, payload }) => {
try {
window._satellite.setVar('payload', payload);
window._satellite.track(type);
} catch (err) {
console.error(err);
}
}, select);
// /actions/MyActions.js
export function myAction() {
let type = 'MY_ACTION';
return {
type,
meta: {
analytics: {
type,
payload: 'example payload'
}
}
};
}
import reporter from './reporter';
export default reporter(({ type, payload }) => {
window.optimizely = window.optimizely || [];
window.optimizely.push(['trackEvent', type, payload]);
}, ({ meta = {} }) => meta.experiments);
// /actions/MyActions.js
export function myAction() {
let type = 'MY_ACTION';
return {
type,
meta: {
experiments: {
type,
payload: 'example payload'
}
}
};
}
// /actions/MyActions.js
export function myAction() {
let type = 'MY_ACTION';
let report =
return {
type,
meta: {
adobedtm: {
type,
payload: {
userType: 'xyz',
region: 'xyz'
}
},
newrelic: {
type,
payload: 'example payload'
}
}
};
}
// todo
// todo
// todo
// todo
// todo
// todo
FAQs
Redux middleware for reporting actions to third party APIs.
The npm package redux-reporter receives a total of 164 weekly downloads. As such, redux-reporter popularity was classified as not popular.
We found that redux-reporter demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
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.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
Security News
A Stanford study reveals 9.5% of engineers contribute almost nothing, costing tech $90B annually, with remote work fueling the rise of "ghost engineers."
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.