Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

redux-debounce-listener

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

redux-debounce-listener

A proxy creator for Redux store to debounce listeners.

  • 0.0.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1
Maintainers
1
Weekly downloads
 
Created
Source

Redux Debounce Listener

A proxy creator for Redux store to debounce listeners.

Motivation

Redux Debounce Listener allows you to delay invoking listeners. If you use this with React, rendering cost may be reduced.

Installation

npm install --save redux-debounce-listener

Example App

$ cd example
$ npm install
$ npm start

Examples of Use

Simple

import { createStore } from 'redux';
import debounceListener from 'redux-debounce-listener'
import rootReducer from './reducers/index';

// create a store that has redux-debounce-listener enabled
const finalCreateStore = debounceListener(50, { 'leading': true })(createStore);

const store = finalCreateStore(rootReducer);

Composition

import { createStore, applyMiddleware, compose } from 'redux'
import thunk from 'redux-thunk'
import debounceListener from 'redux-debounce-listener'
import rootReducer from './reducers/index';

// create a store that has redux-thunk middleware and dux-debounce-listener enabled
const finalCreateStore = compose(
  applyMiddleware(thunk),
  debounceListener(50, { 'leading': true })
)(createStore)

const store = finalCreateStore(rootReducer);

API

debounceListener([wait=0], [options])

wait and options parameters are passed to the lodash debounce function.

See debounce for details.

License

MIT

Keywords

FAQs

Package last updated on 13 Dec 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc