私はReact Native RefreshコントロールをIOS上で動作させています。アンドロイドでネイティブのrefeshコントロールを反応させますか?
https://facebook.github.io/react-native/docs/refreshcontrol.html
私はアンドロイドシム上でそれを実行し、それが動作しません。
エラーは、未処理の約束拒否を示しています。 Android上で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>
}
}
}