Answer the question
In order to leave comments, you need to log in
How to make new records in mysql appear at the top, first???
Good afternoon, I want to make it so that when entering a record in the database, it is displayed first (above) in the application. How to do this kind of sorting?
<FlatList
data={this.state.dataSource}
renderItem={({ item }) =>
<View style={styles.item}>
<Text style={styles.title}>
<Text style={{backgroundColor: "#ff6a6a", padding: 5, color: '#fff', fontSize:10}}> {item.id} </Text>
<Text>{item.title}</Text>
</Text>
<Image resizeMode="cover" source={{ uri: item.thumbnailUrl }} style={styles.imageView} />
<Text style={{padding: 5, color: '#737373',flex: 1}}>{item.announce}</Text>
</View>
}
keyExtractor={(item) => item.id.toString()}
/>
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question