【发布时间】:2020-06-19 12:37:25
【问题描述】:
我了解 Animated.Code 我在每一帧中都得到了 console.log
我想知道 Animated.interpolate 的输出当前值
代码片段
const diffClampScrollY = Animated.diffClamp(this.props.Animation_Header_Heaght, 0, HEADER_HEIGHT)
const headerY = Animated.interpolate(diffClampScrollY, {
inputRange: [0, HEADER_HEIGHT],
outputRange: [0, -HEADER_HEIGHT],
})
render(){
return(
<Animated.Code>
{() =>
call([headerY], () => {
console.log(headerY)
})
</Animated.Code>
)
}
我不明白来自console.log(headerY)的对象
我想知道单个当前值?
【问题讨论】:
标签: reactjs react-native react-native-reanimated react-native-gesture-handler