Package Exports
- redux-lytics
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (redux-lytics) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
Redux-lytics
Redux-lytics is a simple Redux middleware used to log events to a external service through HTTP POST requests.
Getting Started:
Install redux-lytics:
- NPM:
npm install redux-lytics
- Yarn:
yarn add redux-lytics
Usage:
// index.js
import { createLogger } from 'redux-lytics';
import { config, defaultHeaders } from './config';
const logger = createLogger(config, defaultHeaders);
const middleware = [logger];
// config.js
export const config = {
INCREMENT: {
url: "/analytics",
body: {'key': "hello"},
headers: {}
}
};
export const defaultHeaders = {
Accept: 'application/json'
};