Skip to content

ashaffer/redux-timing

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published