Skip to content

0.28

Latest
Compare
Choose a tag to compare
@nandorojo nandorojo released this 22 Feb 18:08
· 13 commits to master since this release

Breaking changes 🚨🚨

A small breaking change (but not really.)

In previous versions of Moti, transform arrays used transition.transform for style-specific transitions.

For example:

<MotiView 
  transition={{ type: 'timing', scale: { type: 'spring' } }}
  animate={{ transform: [{ scale: on ? 1 : 0 }] }}
/>

In this case, scale should have type: 'spring'. However, since this was using the transform array instead of inline scale, this was only customizable using transition.transform instead of transition.scale.

As a result, the above example would have type: 'timing' for scale, which feels incorrect.

In 0.28, the above example will use type: 'spring' for scale.

I considered making this a patch release, since it's technically just a fix. However, since some people may have used transition.transform in their code to get around this issue, I made it a "major" version to indicate that there's a breaking change.

0.28.1 Update

In 0.28.1, the new change is backwards-compatible with transition.transform. transition will prefer scale over transform, but if you pass transform to transition, it will apply (as long as you don't pass scale too).

TLDR: In 0.28.1, the new behavior is added, ands support for the previous behavior is preserved.

Performance

There is an ongoing effort to improve performance in any way possible. This version reduced the number of hooks by 4 in motify. Any single benchmark I can run to reduce a single ms of performance will be done. This will take some time and will get documented at #336

What's Changed

Full Changelog: v0.27.1...v0.28.0