React Native 函数组件 ScrollView 滚动到顶部
// 引入 useRef
import React, {useRef} from "react";
// 定义变量
let scrollRef = useRef();
// 页面引用
<ScrollView
style={styles.scrollContent}
ref={scrollRef}>
<View style={styles.content}>
</View>
</ScrollView>
// 调用
if(scrollRef.current){
scrollRef.current.scrollTo({x:0, y:0, animated: true});
}