showing results for - "flatlist like in reactjs"
Juan Pablo
04 Oct 2016
1There is no specific component like it is in react-native to do this kind of stuff, so I usually just use map() to achieve this kind of things.
2
3But if it is reusable you can surely create a List component for yourself so that you don't write map() function each time for the same list.
4
5Kind of like this:
6
7function Item(props) {
8   return <li>{props.value}</li>;
9}
10
11function MyList(items) {
12   return (
13    <ul>
14      {items.map((item) => <Item key={item.key} value={item} />)}
15    </ul>
16  );
17}