gimme-state

1.0.28 • Public • Published

gimme-state for Redux

  • super simple colored redux logger for native and web

gimme-state-screenshot

Install

npm i gimme-state

Basic Usage

import { applyMiddleware, createStore } from 'redux';
import {gimme} from 'gimme-state'

const store = createStore(
  reducer,
  applyMiddleware(gimme)
)

To Just Log What Changed:

import { applyMiddleware, createStore } from 'redux';
import {gimmeDiff} from 'gimme-state'

const store = createStore(
  reducer,
  applyMiddleware(gimmeDiff)
)

Custom Logger

  • before: refers to the previous state
  • action: refers to the action you are dispatching
  • after: refers to the state post dispatch
  • fullColors: set to false if you are using remote debugger and want color, keep true if you are looking at the logs in your terminal
import { applyMiddleware, createStore } from 'redux';
import {customGimme} from 'gimme-state'

const store = createStore(
  reducer,
  applyMiddleware(customGimme({fullColors:true}))
)

License

MIT

/gimme-state/

    Package Sidebar

    Install

    npm i gimme-state

    Weekly Downloads

    34

    Version

    1.0.28

    License

    ISC

    Unpacked Size

    34.8 kB

    Total Files

    7

    Last publish

    Collaborators

    • 11grossmane