gitmyhub

react-native-reanimated

TypeScript ★ 11k updated 19h ago

React Native's Animated library reimplemented

React Native Reanimated is a library that makes mobile app animations fluid by running them on a dedicated thread separate from JavaScript, replacing React Native's built-in animation system with a far more powerful one.

TypeScriptJavaScriptReact Nativesetup: moderatecomplexity 3/5

React Native Reanimated is a library for building smooth animations in React Native apps. React Native is a framework for writing mobile apps using JavaScript, and it comes with a basic animation system built in. Reanimated replaces and significantly extends that built-in system, focusing on making animations feel fluid by running them on a separate thread rather than the main JavaScript thread where most app logic lives.

This repository contains two related packages. The first is Reanimated itself, which provides the tools developers use to define animations, handle gestures, and create interactive transitions. The second package, called Worklets, is a lower-level piece that enables JavaScript code to run on a separate thread in React Native apps. Reanimated is built on top of Worklets to achieve its performance characteristics.

The current major version, Reanimated 4, only supports the new React Native architecture. If an app is still using the older React Native architecture, it needs to stay on version 3. The README points to dedicated documentation sites for both packages rather than explaining the full API inline.

The library is maintained by a Polish software agency called Software Mansion, with financial backing from Shopify and Expo. It is released under the MIT license, which allows free use in commercial and personal projects. Developers looking to try it out can find an example app in the repository under the apps directory to see the API in action without needing to set up a full project.

Where it fits