Recent Posts

Site Creator

React Native : Basic : Interaction with List , Images

Posted on

Hello Friends

Today we are going to learn , how to make FlatList in React native. We will be adding one custom list item. And all this is pretty easy.

Assuming , you already have a working setup for react native.

So create a new component for example App2List inside App2List.js file [ to be added].

We will start with importing desired components like below


For FlatList , it’s , important we set its props , [ data, renterItem] so that it can be used perfectly in our program.

so in the above code snippet we need to set datasource. datasource could be an array of your custom objects.

renderItem is set as an error function,

 

So to sum up below it the full file

 

 

Output will be as below

 

 

Happy Coding

 







Disclaimer: The aforesaid writeup by Relsell Global writer is for the general understanding of the readers. It does not render any professional advice or opinion.

SHARE THIS PAGE!

Leave a Reply

Your email address will not be published. Required fields are marked *