Android App Development
iOS App Development
Cross Platform App Development
Hire on-demand project developers and turn your idea into working reality.
Big thanks to Webkul and his team for helping get Opencart 3.0.3.7 release ready!
Deniel Kerr
Owner and Founder. Opencart
Top Partners
In this blog, I am discussing the FlatList. Basically, FlatList is a react-native Component and use to load the list of data. It’s an easy way to make an efficient scrolling list of data. Not only is it efficient but it’s got an incredibly simple API to work with. If you’ve used or are familiar with the ListView component it’s very similar, just better in (almost) every way. Now ListView is deprecated on react-native.
FlatList has two major props to render the list of data. such as renderItem and data. renderItem is used for load your each Item View and data your list data set.
The feature of FlatList-
Dynamically changing ViewType-
FlatList uses key props to change View Type of its items such List to Grid. Also, one important thing that we need to change the no. of columns dynamically for Grid Type.
In Above Code snipped I have use List View and Grid View display of FlatList items. In Grid View use 2 columns and list View use 1 column. “this.state.isGrid” is changing according to the type of view after clicking the button. ListEmptyComponent props use for displaying my Empty component what List data is empty. onEndReached props use for pagination of list data and load second-page data when the user reached on the last item after scrolling.
View Of Layout –
Issues with FlatList- If I am using FlatList in my App I have faced one issue on Scrolling,
References:
https://facebook.github.io/react-native/docs/flatlist
Your email address will not be published. Required fields are marked*
Name*
Email*
Save my name email and website in this browser for the next time I comment.
Be the first to comment.
We use cookies to personalize your experience. By continuing to visit this website you agree to our use of cookies. Learn more about privacy policy
All communication is done through a ticket system. I appreciate the regular almost daily updates of what is being worked on, and communicating changes or updates is easy through this system. Mobikul's response timeframe is quick.
Josh Arnold
Owner, Shop ATV Escape
USA
India
Global
Name
Email
Enquiry or Requirement
If you have more details or questions, you can reply to the received confirmation email.