Tween store state.
Library is experimental and may not meet your expectations.
Redux Tween provides a way to change state in Redux store smoothly, interpolating states in between.
To achieve this Redux Tween either enhances store or wraps some of action creators and reducers (i.e. some of your ducks).
How it works
Redux Tween uses wrapped reducer to calculate next state. Instead of immediately applying new state, Redux Tween launches transition to push interpolated states on every frame.
Redux Tween uses d3-transition to start and interrupt transitions. Redux Tween allows running one transition per reducer, interrupting previous transition if necessary.
Redux Tween uses d3-interpolate which allows interpolating between numbers, strings, colors, dates. Most importantly, it supports objects and arrays interpolation so you can interpolate custom nested data structures (even the store itself).
$ yarn add redux-tween # or $ npm install --save redux-tween
Integration and usage
$ cd examples/store $ # or $ cd examples/action-and-reducer $ yarn $ yarn start
- Add basic/advanced integrations comparison;
- More tests;
- Better examples;
- Improve examples and dependencies organization (300 MiB is too much);
- Check for corner cases;
- Rewrite in TS.
Your input is highly appreciated.
This library is experimental, bug reports and PRs are welcome. I'd be happy to help you integrating Redux Tween into other software.
To modify library, follow these steps:
- Install dependencies:
- Run tests:
MIT © Dmitriy Semyushkin