Reanimated 2.0 stable release is out with a Jest testing API
Software Mansion has published the stable release of Reanimated 2.0. The first 2.0 beta appeared in June 2020. The stable version follows a series of beta and RC releases shaped by community feedback.
What changed since the beta
The team describes the beta as less polished than intended. The team needed to put it in developers' hands to see how it would be used and what to improve. Three areas got most of the attention on the way to stable.
Developer experience. Hot-reload support, proper exception reporting, alerts on common mistakes, and ease of installation were early pain points. The team reports that all of these have improved considerably.
API coverage. The API was extended to cover use cases raised by the community. New additions include:
- animated reactions
- synchronous measure and scroll
- synchronous layout updates
Stability. More than 300 issues were reported for Reanimated 2, and close to 90% of them have been addressed. That work fixed library crashes and improved both CPU and memory efficiency.
80 people contributed code to the v2 release. Terry Sahaidak, William Candillion, and Marc Rousavy are named for their steady stream of suggestions and contributions.
Testing API for Jest
Engineers at Shopify drove the addition of a testing API, which ships in the 2.0 stable release. It has two goals:
- let components that depend on Reanimated be tested with common React ecosystem tools
- make it possible to test the state and progress of animations and interactions
The API is a set of methods for use with Reanimated-powered components when running tests in Jest. A new testing guide on the docs site covers the details. Shopify, which supported the Reanimated 2 work, will continue its partnership with Software Mansion in 2021.
Expo support
A beta of Reanimated 2 has been available in Expo since SDK 39, released in August 2020. The stable release is planned for the next Expo SDK, version 41, due in the coming weeks.
About the team
Reanimated is built by Software Mansion's React Native Open Source team. The team also maintains react-navigation, react-native-gesture-handler, and react-native-screens. Over the past year it grew from three to more than twelve people.
Links
Source: swmansion.com