0
我有這樣的元素的列表清單,如何重裝鑑於反應母語
<ScrollView style={[styles.mainContainer, styles.tripsContainer]}>
<View style={{
flex: 1,
flexDirection: 'row',
justifyContent: 'center',
alignItems: 'center',
marginBottom: 10
}}>
<Text textAlign='center' style={{ fontWeight: 'bold' }}>{100 - (totalDuration/24).toFixed(0)} days and {totalDuration % 12} hours required...</Text>
</View>
{rows}
<Animated.View shouldRasterizeIOS={true}>
<ActivityIndicator animating={!tripsReady} style={[styles.centering, { height: 80 }]} size="large" />
</Animated.View>
</ScrollView>
這裏{行}包含這樣的數組,
<TouchableHighlight key={i} onPress={() => {
// get rest of the trip data from meteor;
NavigationActions.tripDetails({record:record, tripId:i+1,removeTrip:(id)=>this.removeTrip(id)});}}>
<View>
<TripCard tripNo={i + 1} date={timeStarted} duration={record.trip.duration} distance={record.trip.distance.toFixed(2)} vehicle={record.trip.vehicle} />
</View>
</TouchableHighlight>
後我從行變量中刪除了一個元素如何重新加載當前頁面?
謝謝@matinarroyo –