redux-lytics

1.3.0 • Public • Published

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'
};

/redux-lytics/

    Package Sidebar

    Install

    npm i redux-lytics

    Weekly Downloads

    0

    Version

    1.3.0

    License

    MIT

    Unpacked Size

    144 kB

    Total Files

    9

    Last publish

    Collaborators

    • cadz7