cuốn sách gpt4 ai đã làm

javascript - Animated.Component/createAnimatedComponent(Component) 与 Component 有何不同?

In lại Tác giả: Hồ Xil 更新时间:2023-11-01 02:27:21 28 4
mua khóa gpt4 Nike

我们正试图从 styled-components 项目中找出以下问题的原因:https://github.com/styled-components/styled-components/issues/389

对 refs + setNativeProps 进行了一些更改,在一个地方破坏了动画,假设是因为一些动画相关信息没有被正确传递。

因此问题是了解 createAnimatedComponent 如何改变初始组件,添加了什么?如果传递不正确,什么会导致动画中断?

如果您知道可能导致此问题的原因,请提供想法/详细答案。

gia hạn与问题相关的重大更改发生在 this file 中的某处引用 innerRef 向下传递 ref,isTag 函数检查它是否是原生组件。

câu trả lời hay nhất

animatable components can be animated. View, Text, and Image are already provided, and you can create custom ones with createAnimatedComponent. These special components do the magic of binding the animated values to the properties, and do targeted native updates to avoid the cost of the react render and reconciliation process on every frame. They also handle cleanup on unmount so they are safe by default.

https://facebook.github.io/react-native/docs/animated.html

关于javascript - Animated.Component/createAnimatedComponent(Component) 与 Component 有何不同?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41808942/

28 4 0
Chứng chỉ ICP Bắc Kinh số 000000
Hợp tác quảng cáo: 1813099741@qq.com 6ren.com
Xem sitemap của VNExpress