Skip to content

0.24

Compare
Choose a tag to compare
@nandorojo nandorojo released this 01 Mar 19:38
· 84 commits to master since this release

🎁 New Features

⚡️ Example apps

With the release of Reanimated 3, Moti now works on StackBlitz! The examples on the Moti site are now finally interactive. Since Moti was broken on Expo Snack, I migrated all examples to StackBlitz and added a few more throughout the docs.

moti.fyi/examples/hello-world

Over time, I'll try to add more interactive examples to the docs, as well as accepting PRs for more. You can find some in the examples/with-expo/src folder. Feel free to fork the starter on StackBlitz.

🩻 Skeleton

Performance

There were some improvements to make the Skeleton less heavy and memory intensive.

react-native-linear-gradient

Moti's Skeleton now supports react-native-linear-gradient as an alternative to expo-linear-gradient. This is useful if you aren't using Expo.

The default behavior is still expo-linear-gradient.

Click here to use react-native-linear-gradient

This addresses #237.

To use react-native-linear-gradient add this to your app's babel.config.js's plugins array.

// babel.config.js
module.exports = function (api) {
  api.cache(true)
  return {
    plugins: [
      [
        'module-resolver',
        {
          root: ['./'],
          alias: {
            'moti/skeleton': 'moti/skeleton/react-native-linear-gradient',
          },
        },
      ],
    ],
  }
}

This assumes you've installed react-native-linear-gradient.