Closed ozican closed 6 years ago
Could you provide a Snack from expo.io and details a bit more your issue. From what i understand, you want a simple ListView.. which is not the point of this project
Hello, It is simple. I have a ListView and it lists items from firebase's database. My problem was, when i add new item to firebase, it sending in ListView's bottom... I wanted to newest come to top.. And then for this reason I install react-native-invertible-scroll-view. Now newest on the top of ListView but now the problem is, screen starts ListView's bottom, when i open my app i have to scroll to top for see the new item.
So you don't need react-native-invertible-scroll-view
. It is not about the layout, it is about your data.
You need to reverse the order of your data array.
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reverse
yes but I can not order in react native. If there is a example i want to see... I try lots of way but I couldn't be success.
hey it worked!!! You are amazing man!!
createDataSource({ studentsArray }) {
const ds = new ListView.DataSource({
rowHasChanged: (r1, r2) => r1 !== r2
});
this.dataSource = ds.cloneWithRows(studentsArray.reverse());
}
Hello everyone. My app start in feed, i reversed with react-native-invertible-scroll-view. But it starts bottom like whatsapp but I want to it starts on top like facebook homepage. Please help me!