on-internet
← Community

React Native : Flatlist and Array

Stack Overflow ·

it is a common question surely, but I can not render a FlatList with array source. I follow this example :https://medium.com/javascript-in-plain-english/how-to-loop-through-arrays-in-react-3eaa8a14445 The example begins with : let shoppingCart = [ {id: 35, item: 'jumper', color: 'red', size: 'medium', price: 20}, {id: 42, item: 'shirt', color: 'blue', size: 'medium', price: 15}, {id: 71, item: 'socks', color: 'black', size: 'all', price: 5}, ] This how I actually work to fill an array in my work. Then, I follow the instructions, with an arrangement : this.items = this.shoppingCart.map((item, k

Comments

Sign in or sign up to comment and upvote.

No comments yet.