IOS에서 React Native Refresh 컨트롤을 사용하고 있습니다.안드로이드에서 기본 refesh 컨트롤 작업에 반응합니까?
https://facebook.github.io/react-native/docs/refreshcontrol.html
나는 안드로이드 SIM에서 실행하고 작동하지 않습니다.
오류 처리되지 않은 약속 거부가 표시됩니다. 안드로이드에 RefreshControl와있는 ScrollView를 사용하도록 지원하는 경우 나도 몰라
import React, { Component } from 'react';
import {
RefreshControl,
} from 'react-native';
export default class Products extends Component {
_onRefresh() {
this.setState({refreshing: true});
this.likedProducts()
}
render() {
return (
<View style={styles.container}>
<ScrollView
contentContainerStyle={styles.scrollContent}
showsHorizontalScrollIndicator={false}
showsVerticalScrollIndicator={false}
refreshControl={
<RefreshControl
refreshing={this.state.refreshing}
onRefresh={this._onRefresh.bind(this)}
/>
}
>
...
</ScrollView>
</View>
}
}
}