https://github.com/nas5w/redux-debounce-middleware
An approach to debouncing in Redux using middleware.
https://github.com/nas5w/redux-debounce-middleware
Last synced: about 2 months ago
JSON representation
An approach to debouncing in Redux using middleware.
- Host: GitHub
- URL: https://github.com/nas5w/redux-debounce-middleware
- Owner: nas5w
- Created: 2019-12-30T04:16:15.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2019-12-30T04:25:08.000Z (almost 6 years ago)
- Last Synced: 2025-07-24T17:31:02.119Z (3 months ago)
- Language: JavaScript
- Size: 1.95 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Debouncing with React Middleware
This repository accompanies the blog post [Debouncing with Redux Middleware](https://typeofnan.dev/debouncing-with-redux-middleware/).
## Introduction
A common conundrum in today’s front-end framework world is knowing when and how to take certain asynchronous actions, such as persisting data to a backend. If we’re using a state management library like Redux, we might be further confused as to where without our Redux code we might put this logic.
## Exploring the Content of this Repository
This repository simple contains the `debounceMiddleware.js` file containing our middleware function. To incorporate this into an existing Redux app, you can use `applyMiddleware`. For example:
```javascript
const store = createStore(reducer, applyMiddleware(debounceMiddleware));
```