Documentation
For more information about this library and its API, see https://docs.swmansion.com/react-native-reanimated/ in the official Software Mansion documentation.Installation
-
Add the JavaScript library dependency in the package.json file:
-
Add the
@amazon-devices/react-native-reanimatedplugin to your babel.config.js: -
Run the following command to clear the Metro bundler cache:
-
Reinstall the package-lock.json file by running the
npm installcommand.
Examples
The following example shows how to run a simple animation in an infinite loop using thewithTiming method.
withSpring function:
API support
The reanimated library on Vega provides a Turbo Module which adds a support for most of methods listed below.Animations
Core
Scroll
Device
Threading
workletize
Workletize means to convert a JavaScript function into a serializable object which can be copied and ran on a UI thread. Functions are marked with “worklet”. Directives are automatically picked up and workletized by the Reanimated Babel plugin.Utilities
Advanced APIs
Exceptions
The reanimated library on Vega has a few exceptions in terms of API support. Vega doesn’t support the following hooks and methods:useAnimatedSensoruseReducedMotionLayout Animationson FabricSETs (Shared Element Transitions)
Known Issues on Vega
- Animations that use
withRepeatstop repeating after fast refresh is used. - Style does not update on the animation after fast refresh is used.

