github Shopify/react-native-skia v0.1.105-alpha
Release 0.1.105 alpha

latest releases: v0.1.197-beta, v0.1.196-beta, v0.1.195-beta...
2 years ago

What's Changed

Breaking Changes

The animation system has been updated and we are moving away (deprecating) property callback syntax in favour for our new derived value system. This is implemented in C++ and is fast and efficient:

const Component = () => {
  const { width } = useWindowDimensions();
  // Create timing loop
  const progress = useLoop({
    duration: 1000,
    easing: Easing.inOut(Easing.cubic),
  });
  // Animate position of circle
  const position = useDerivedValue(
    (p) => mix(p, 10, width - (Size + Padding)),
    [progress]
  );
  // Animate radius of circle
  const radius = useDerivedValue((p) => 5 + p * 55, [progress]);
  return (
    <Canvas style={styles.canvas}>
      <Fill color="white" />
      <Circle cx={position} cy={20} r={radius} color="#DC4C4C" />
    </Canvas>
  );
};

Consult the Animation section in the documentation for more details!

Full Changelog: v0.1.103-alpha...v0.1.105-alpha

Don't miss a new react-native-skia release

NewReleases is sending notifications on new releases.