如何写精华回答,获更多曝光?
发布
<ScrollView>
onScroll={Animated.event(
[
{
nativeEvent: {
contentOffset: {
y: this._nativeOffset.y,
x: this._nativeOffset.x
}
}
}
],
{ useNativeDriver: false, listener: this._onScroll }
)}
其中useNativeDriver 参数,如果设置为true,滑动时会报错 {“name”:“TypeError”,“reason”:"_this.props.onScroll is not a function (it is Object)",“stacks”:"TypeError: _this.props.onScroll is not a function (it is Object)\n a