Releases: aholachek/react-flip-toolkit
Typescript refactor
- Bumped minor version instead of releasing a patch since it was a large refactor
- Convert library to use typescript
- Optimize animations to ignore elements whose scale or transform doesn't meet a minimum threshold of transformation
Patch rerelease because types file wasn't copied over in previous patch
Fix experimental `debug` prop
5.0.0
Summary: Use a Reboundjs
fork instead of Wobblejs
for better performance. Add a lot more options for staggering.
Improved
-
Better performance: Moved from the library
Wobblejs
, that creates a render loop for each spring animation, to a custom fork ofReboundjs
, that creates only a single render loop for all existing animations. Chrome perftools profiling shows significantly less JavaScript time for each frame, resulting in a slightly higher average frame rate. -
Nested Stagger: Before, you could only stagger elements a single level. Now, you can have elements that are staggered for arbitrarily deep levels, enabling animations such as this one.
Added
-
More stagger configuration options:
speed
andreverse
. You can config the stagger in thestaggerConfig
prop on theFlipper
component. -
An improved API for deciding whether a
Flipped
component should actually flip. Now you can pass down some state from theFlipper
component in thedecisionData
prop, which will be passed into theshouldFlip
orshouldInvert
functions on the childrenFlipped
components. -
A new spring preset,
veryGentle
, that has just the tiniest bit of bounce.
Removed
- As a corollary to #3 in the Added section, removed the old way of telling a
Flipped
element whether or not to animate (componentId
andcomponentIdFilter
).
Degraded
- The size of the library increased by about 1kb (gzipped) to 8kb gzipped. Most of the additional code was handling improved stagger configurability although the switch to rebound added a tiny bit as well. I'll be attempting to reduce the size of the library in an upcoming pr.