@strategies/target-animate
TypeScript icon, indicating that this package has built-in type declarations

1.0.6 • Public • Published

Summary

Extremely simple state-based animation

Using a TargetWrapper for any property's getter/setter, we can delay the resolution of the object to that display state.

Because this is not true animation - objects always simply approach their target state - it is not only very simple, but it effortlessly handles situations where regular timing-based animation get tricky (state changing before animation is complete).

Once set, objects can be updated based on stateful calculations.

Implementation

This is implemented in two ways:

  1. This implementation is defining a react Hook: and exports useTarget, only depending on react for state management,

  2. The second implementation depends on mobx for state management, and is more tailored to our internal setup.

installation

yarn add @strategies/target-animate

example usage

TBD

undocumented example usage:

https://bitbucket.org/sasaki_dev/react-fiddles/src/master/src/fiddles/delayed-state-animation/prioritizer/

https://misc-tools.s3.amazonaws.com/testbed/prioritizer-3-poc/index.html

http://misc-tools.s3-website-us-east-1.amazonaws.com/testbed/prioritizer-3-poc

License

MIT

Readme

Keywords

none

Package Sidebar

Install

npm i @strategies/target-animate

Weekly Downloads

1

Version

1.0.6

License

MIT

Unpacked Size

1.18 MB

Total Files

10

Last publish

Collaborators

  • scottdpenman
  • tadiraman
  • sasaki-dev
  • arminakvn
  • eyoungberg
  • sasaki-strategies