Technology Radar
Published : Oct 27, 2021
NOT ON THE CURRENT EDITION
This blip is not on the current edition of the Radar. If it was on one of the last few editions, it is likely that it is still relevant. If the blip is older, it might no longer be relevant and our assessment might be different today. Unfortunately, we simply don't have the bandwidth to continuously review blips from previous editions of the Radar.
Understand more
Oct 2021
Trial
如果我们想在 React Native 应用中制作动画,可是使用 React Native Reanimated 2.0。 我们之前有 Reanimated 1.x,但它存在与 Reanimated 声明式语言的复杂性相关的问题,并且还有一些与 React Native JavaScript 线程和 UI 线程之间的初始化和通信相关的额外性能成本。 Reanimated 2.0 尝试重新构想如何在 UI 线程中绘制动画;它允许我们使用 JavaScript 编写动画代码并在使用名为 animation worklets 的新 API 的 UI 线程上运行它们。它通过在 UI 线程上生成一个辅助 JavaScript 上下文来使之可以运行 JavaScript 函数。 我们在需要动画的 React Native 项目中使用它,并且非常喜欢它。