↧
Answer by Mohammed Ashfaq for How to sort list of objects within renerItem of...
class ParentComponent extends Component { sortItemByKey = key => { const { items } = this.state; const clonedItems = items.map(item => ({ ...item })); clonedItems.sort(compare); this.setState({...
View ArticleHow to sort list of objects within renerItem of flatlist?
Hello I want to sort an object within renderItem of FlatList.I'm getting array of objects as server response.I want to do sorting within these objects.I've a list of cars with their price. If the user...
View Article