Skip to content

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Latest commit

 

History

11 Commits

Folders and files

Repository files navigation

Redux debouncer

Install

yarn add redux-debouncer

How to use

import { makeReduxDebouncer } from 'redux-debouncer'

/**
 * type: string,
 * interval:? number,
 * compare:? (currentAction: any, prevAction: any) => bool,
 */
const incrementDebounce = makeReduxDebouncer({ type: 'increment' })

const middleware = [
  /* your middleware */
  incrementDebounce
]

Example

  // debouncer for react navigator
  export const reactNavigationDebounce = makeReduxDebouncer({
    type: 'Navigation/NAVIGATE',
    compare: (current, prev) => current.routeName === prev.routeName,
  })

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages