JSPM

redux-batched-subscribe

0.1.1
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 18946
  • Score
    100M100P100Q153372F
  • License MIT

higher order redux store which allows batching subscribe notifications.

Package Exports

  • redux-batched-subscribe

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (redux-batched-subscribe) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

redux-batched-subscribe

build status npm version

Allows for batching of subscribe notifications that occur as a result of Redux dispatches.

npm install --save redux-batched-subscribe

Usage

Debounced subscribe handlers:

import { batchedSubscribe } from 'redux-batched-subscribe';
import debounce from 'lodash.debounce';

const batchDebounce = debounce(notify => notify());
const store = batchedSubscribe(batchDebounce)(createStore)(reducer, intialState);

React batched updates

import { batchedSubscribe } from 'redux-batched-subscribe';

// React <= 0.13
import { addons } from 'react/addons';
const batchedUpdates = addons.batchedUpdates;

// React 0.14-beta
import { unstable_batchedUpdates as batchedUpdates } from 'react-dom';

const store = batchedSubscribe(batchedUpdates)(createStore)(reducer, intialState);

Thanks

Thanks to Andrew Clark for the clean library structure.