1.3.9 • Published 6 years ago

react-redux-delay v1.3.9

Weekly downloads
3
License
MIT
Repository
github
Last release
6 years ago

(a part of restate project)

Just delay update propagation. Or debounce. Or Throttle. Why not?

Sometimes store could update rapidly. Much more often than you need. Known solution to mitigate the problem is named batching.

For example - redux-batched-subscribe - redux store enhancer to "batch" updates. It just delays the notification of "subscribed" to redux elements, react-redux for example.

Redux-delay is doing absolutely the same, but from react side.

All the elements and their descendants, wrapped by ReduxDelay will receive redux store updates in batched, or, to be more concrete - debounced way.

import reduxDelay, { ReduxDelay } from 'react-redux-delay';

const ThrottledComponent = reduxDelay(16 /* 60 "FPS" */, 'throttle')(BaseComponent);

const App = () => (
  <ReduxDelay timeout={200} mode="debounce">
    <RestOfApplication />
  </ReduxDelay>
);

Supported modes - 'debounce', or 'throttle'.

Licence

MIT

1.3.9

6 years ago

1.3.8

6 years ago

1.3.7

6 years ago

1.3.6

6 years ago

1.3.3

6 years ago

1.3.2

6 years ago

1.3.0

6 years ago

1.2.2

6 years ago

1.2.1

6 years ago

1.2.0

6 years ago