
Security News
Crates.io Implements Trusted Publishing Support
Crates.io adds Trusted Publishing support, enabling secure GitHub Actions-based crate releases without long-lived API tokens.
redux-debounce
Advanced tools
FSA-compliant middleware for Redux to debounce actions.
$ npm install --save redux-debounce
// Store setup
import { applyMiddleware, createStore } from 'redux'
import createDebounce from 'redux-debounce'
import createLogger from 'redux-logger'
import promise from 'redux-promise'
import thunk from 'redux-thunk'
const config = {
simple: 300
}
const debouncer = createDebounce(config)
const logger = createLogger()
const createMiddleware = applyMiddleware(thunk, debouncer, promise, thunk)
const store = createMiddleware(createStore)(reducer)
const debounceAction = () => ({
meta: {
debounce: 'simple',
},
type: 'TEST',
})
Debounce middleware should be placed near the top of the chain.
See the example directory.
$ cd example
$ npm install
$ npm start
redux-debounce
exposes single constructor function for creating debounce middleware.
createDebounce( options: Object )
Each option is a property to setup different debounces for different actions.
Number of milliseconds to debounce the action for.
Number of milliseconds to debounce the action for.
Maximum number of milliseconds before the action is called.
See lodash for the rest of the supported options.
Copyright © 2015-2016 Neil Kistner
Released under the MIT license. See license for details.
FAQs
FSA-compliant middleware for Redux to debounce actions.
The npm package redux-debounce receives a total of 523 weekly downloads. As such, redux-debounce popularity was classified as not popular.
We found that redux-debounce demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Security News
Crates.io adds Trusted Publishing support, enabling secure GitHub Actions-based crate releases without long-lived API tokens.
Research
/Security News
Undocumented protestware found in 28 npm packages disrupts UI for Russian-language users visiting Russian and Belarusian domains.
Research
/Security News
North Korean threat actors deploy 67 malicious npm packages using the newly discovered XORIndex malware loader.