Wondering what’s next for npm?Check out our public roadmap! »

redux-idle-dispatcher

2.0.1 • Public • Published

redux-idle-dispatcher

⌛️ Idle your redux app with ease!

Why?

Dispatch a custom action after a duration of store idleness in the active browser tab.

The action is debounced so that it's only called once after the duration of idleness. Additionally, the action is only dispatched if the browser tab is active, dispatching immediately on reactivation.

Installation

npm install --save redux-idle-dispatcher

Usage

const unsubscriber = reduxIdleDispatcher(
  store,    // your redux store
  timeout,  // default is 30000 (ms)
  action    // default is {type: '@@redux-idle-dispatcher/IDLE'}
)

Install

npm i redux-idle-dispatcher

DownloadsWeekly Downloads

12

Version

2.0.1

License

MIT

Unpacked Size

22.2 kB

Total Files

12

Last publish

Collaborators

  • avatar