0.1.0 • Published 8 years ago

redux-timing v0.1.0

Weekly downloads
5
License
MIT
Repository
github
Last release
8 years ago

redux-timing

js-standard-style

Timing functions (throttle/debounce) for redux actions

Installation

$ npm install redux-timing

Usage

Each instance of these middleware debounce/throttle a single action. You use it like this:

import {throttle, debounce} from 'redux-timing'

applyMiddleware(
  debounce('saveDocument', 1000),
  throttle('updateScrollSpy', 100),
  ...otherMiddleware
)

Shouldn't I be using the meta property to do this?

Yes, generally if you are using redux as a global middleware system for your app. This library is specifically designed to work with vdux's fractal component-level middleware stacks, and makes more sense in that sort of setting.

License

MIT