‚̧Nihilism Philisophy Major
    Wondering what‚Äôs next for npm?Check out our public roadmap! ¬Ľ

    dampen

    0.0.1¬†‚Äʬ†Public¬†‚Äʬ†Published

    dampen

    npm version npm downloads Build Status Coverage Status

    Debounce any redux action-creator.

    const dampen = require('dampen')
     
    const update = dampen(250, payload =>
      ({ type: 'UPDATE', payload })
    )
     
    // elsewhere...
     
    dispatch(update('one'))
    dispatch(update('two'))
    dispatch(update('three'))
     
    // only { type: 'UPDATE', payload: 'three' }
    // will be dispatched after 250ms

    Requires redux-thunk or native support for thunks to function properly.

    Install

    npm i dampen

    DownloadsWeekly Downloads

    1

    Version

    0.0.1

    License

    MIT

    Unpacked Size

    5 kB

    Total Files

    5

    Last publish

    Collaborators

    • avatar