{"id":3494,"date":"2020-07-16T01:58:24","date_gmt":"2020-07-15T20:28:24","guid":{"rendered":"https:\/\/codingislove.com\/?p=3494"},"modified":"2020-07-22T16:35:32","modified_gmt":"2020-07-22T11:05:32","slug":"optimize-react-native-flatlist-performance","status":"publish","type":"post","link":"https:\/\/codingislove.com\/optimize-react-native-flatlist-performance\/","title":{"rendered":"8 ways to optimize React native FlatList performance"},"content":{"rendered":"\n<p>FlatList is the component in <a aria-label=\"undefined (opens in a new tab)\" href=\"https:\/\/codingislove.com\/top-15-react-native-libraries\/\" target=\"_blank\" rel=\"noreferrer noopener\">React native<\/a> that is used to render a list of items. It works great for basic lists but FlatList will have some performance issues if not optimized properly causing laggy scroll and slow performance. Let&#8217;s see how to optimize <a aria-label=\"undefined (opens in a new tab)\" href=\"https:\/\/www.youtube.com\/watch?v=LdKtugH-sb8\" target=\"_blank\" rel=\"noreferrer noopener\">react native<\/a> flatlist performance.<\/p>\n\n\n\n<!--more-->\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"576\" src=\"https:\/\/codingislove.com\/wp-content\/uploads\/2020\/07\/Optimize-flatlist-react-native-cover-1024x576.png\" alt=\"\" class=\"wp-image-3558\" srcset=\"https:\/\/codingislove.com\/wp-content\/uploads\/2020\/07\/Optimize-flatlist-react-native-cover-1024x576.png 1024w, https:\/\/codingislove.com\/wp-content\/uploads\/2020\/07\/Optimize-flatlist-react-native-cover-300x169.png 300w, https:\/\/codingislove.com\/wp-content\/uploads\/2020\/07\/Optimize-flatlist-react-native-cover-768x432.png 768w, https:\/\/codingislove.com\/wp-content\/uploads\/2020\/07\/Optimize-flatlist-react-native-cover.png 1280w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">1. Avoid arrow functions inline for renderItem<\/h2>\n\n\n\n<p>Don&#8217;t use arrow functions inline for <code>renderItem<\/code> of the FlatList. It&#8217;s better if you avoid arrow functions inline for all the props of FlatList like <code>keyExtractor<\/code>, <code>ListHeaderComponent<\/code>, <code>ListFooterComponent<\/code> etc.<\/p>\n\n\n\n<p>Using an arrow function inline re-creates the function on every re-render causing performance issues. It may not be too expensive for a normal component but it is very expensive for a list component that should re-render items on the fly.<\/p>\n\n\n\n<p>If you&#8217;re using a class component then move the <code>renderItem<\/code> out of render function. If you&#8217;re using a functional component then use <code>useCallback<\/code> for the <code>renderItem<\/code> function. Here&#8217;s an example :<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"420\" src=\"https:\/\/codingislove.com\/wp-content\/uploads\/2020\/07\/flatlist-arrow-functions-dont-1024x420.png\" alt=\"flat list dont use arrow functions\" class=\"wp-image-3501\" srcset=\"https:\/\/codingislove.com\/wp-content\/uploads\/2020\/07\/flatlist-arrow-functions-dont-1024x420.png 1024w, https:\/\/codingislove.com\/wp-content\/uploads\/2020\/07\/flatlist-arrow-functions-dont-300x123.png 300w, https:\/\/codingislove.com\/wp-content\/uploads\/2020\/07\/flatlist-arrow-functions-dont-768x315.png 768w, https:\/\/codingislove.com\/wp-content\/uploads\/2020\/07\/flatlist-arrow-functions-dont.png 1346w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"565\" src=\"https:\/\/codingislove.com\/wp-content\/uploads\/2020\/07\/flatlist-arrow-functions-do-1024x565.png\" alt=\"optimize react native flatlist\" class=\"wp-image-3538\" srcset=\"https:\/\/codingislove.com\/wp-content\/uploads\/2020\/07\/flatlist-arrow-functions-do-1024x565.png 1024w, https:\/\/codingislove.com\/wp-content\/uploads\/2020\/07\/flatlist-arrow-functions-do-300x166.png 300w, https:\/\/codingislove.com\/wp-content\/uploads\/2020\/07\/flatlist-arrow-functions-do-768x424.png 768w, https:\/\/codingislove.com\/wp-content\/uploads\/2020\/07\/flatlist-arrow-functions-do.png 1456w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">2. Don&#8217;t use 1080P HD images in the list<\/h2>\n\n\n\n<p>It is a known issue that android can&#8217;t handle 1080P HD images in the list. Even if iOS can handle HD images, it will still cause some performance issues. So Make sure to use Medium resolution photos. Max 720P but keep it as low as possible without compromising on the quality of the images.<\/p>\n\n\n\n<p>You can also cache and optimize the images using a library like <a aria-label=\"undefined (opens in a new tab)\" href=\"https:\/\/github.com\/DylanVann\/react-native-fast-image\" target=\"_blank\" rel=\"noreferrer noopener\">react-native-fast-image<\/a> for better image performance in flatList.<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"425\" src=\"https:\/\/codingislove.com\/wp-content\/uploads\/2020\/07\/flatlist-hd-image-1024x425.png\" alt=\"optimize Flatlist by removing HD images\" class=\"wp-image-3499\" srcset=\"https:\/\/codingislove.com\/wp-content\/uploads\/2020\/07\/flatlist-hd-image-1024x425.png 1024w, https:\/\/codingislove.com\/wp-content\/uploads\/2020\/07\/flatlist-hd-image-300x125.png 300w, https:\/\/codingislove.com\/wp-content\/uploads\/2020\/07\/flatlist-hd-image-768x319.png 768w, https:\/\/codingislove.com\/wp-content\/uploads\/2020\/07\/flatlist-hd-image.png 1330w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure><\/div>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"405\" src=\"https:\/\/codingislove.com\/wp-content\/uploads\/2020\/07\/flatlist-medium-image-1024x405.png\" alt=\"Use medium resolution images\" class=\"wp-image-3500\" srcset=\"https:\/\/codingislove.com\/wp-content\/uploads\/2020\/07\/flatlist-medium-image-1024x405.png 1024w, https:\/\/codingislove.com\/wp-content\/uploads\/2020\/07\/flatlist-medium-image-300x119.png 300w, https:\/\/codingislove.com\/wp-content\/uploads\/2020\/07\/flatlist-medium-image-768x304.png 768w, https:\/\/codingislove.com\/wp-content\/uploads\/2020\/07\/flatlist-medium-image.png 1396w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure><\/div>\n\n\n\n<h2 class=\"wp-block-heading\">3. Optimize maxToRenderPerBatch prop<\/h2>\n\n\n\n<p><code>maxToRenderPerBatch<\/code> prop is used to set the number of items to render on every scroll. 10 is the default number but you can decrease it further depending on the size of the list. I use a simple logic to optimize <code>maxToRenderPerBatch<\/code> &#8211; For example, If 2 items in your list cover 100% of your screen height then set this prop around 3 to 5. If 5 items in your list cover 100% of your screen height then set <code>maxToRenderPerBatch<\/code> to around 8.<\/p>\n\n\n\n<p>This logic will make sure that there&#8217;s always new list items rendered on scroll while also saving the resources by rendering only the number of items that we actually need. <\/p>\n\n\n\n<p>You might see some blank white spaces when scrolling the list very fast but practically that should be fine as no user would scroll that fast. It all depends on the type of list and the user experience of your list. So experiment the number to set <code>maxToRenderPerBatch<\/code> and come up with the best number and optimize the flatList performance efficiently by  rendering only the number of items that are actually required.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">4. Optimize windowSize prop<\/h2>\n\n\n\n<p><code>windowSize<\/code> prop is a measurement unit where 1 is equivalent to your viewport height. The default value is 21 (10 viewports above, 10 below, and one in between).<\/p>\n\n\n\n<p>Most cases you don&#8217;t need the number as big as 21. Again, it depends on the size of the items in your list. For example if each item in your list covers 50% of the device height (so 2 items in viewport) then you can set the windowSize to around 5. That should be enough because by the time you scroll next 10 items (2 * 5) new items would be rendered for sure.<\/p>\n\n\n\n<p>Experiment with this prop based on the size of your list items and come up with the best number to optimize react native flatList.<\/p>\n\n\n<!-- \/112371330\/post-banner -->\r\n<div class=\"ad-wrapper\">\r\n<div id='div-gpt-ad-1595500140430-0' style='width: 250px; height: 250px;'>\r\n  <script>\r\n    googletag.cmd.push(function() { googletag.display('div-gpt-ad-1595500140430-0'); });\r\n  <\/script>\r\n<\/div>\r\n<\/div>\n\n\n\n<h2 class=\"wp-block-heading\">5. Use getItemLayout to optimize flatlist react native<\/h2>\n\n\n\n<p>Using <code>getItemLayout<\/code> in FlatList brings some good performance benefits in my experience. This is really useful! Using getItemLayout removes the need for FlatList to measure the list items layout. But you can use this method only if your list items have a fixed height.<\/p>\n\n\n\n<p>If your list items have dynamic height then you won&#8217;t be able to use this method. Try to modify your list items design to have a fixed height. The performance benefits are worth modifying the design!<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"692\" src=\"https:\/\/codingislove.com\/wp-content\/uploads\/2020\/07\/flatlist-getitemlayout-3-1024x692.png\" alt=\"getitemlayout example flatlist\" class=\"wp-image-3540\" srcset=\"https:\/\/codingislove.com\/wp-content\/uploads\/2020\/07\/flatlist-getitemlayout-3-1024x692.png 1024w, https:\/\/codingislove.com\/wp-content\/uploads\/2020\/07\/flatlist-getitemlayout-3-300x203.png 300w, https:\/\/codingislove.com\/wp-content\/uploads\/2020\/07\/flatlist-getitemlayout-3-768x519.png 768w, https:\/\/codingislove.com\/wp-content\/uploads\/2020\/07\/flatlist-getitemlayout-3.png 1456w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure><\/div>\n\n\n\n<h2 class=\"wp-block-heading\">6. Use fewer Views in your list item to optimize flatlist react native<\/h2>\n\n\n\n<p>Keep your list item component as simple as possible with fewer Views. Don&#8217;t nest a lot of Views one inside another in the list item. Use as few Views as possible. I&#8217;ve personally seen performance issues when there are a lot of views nested in the list item. So remove those unnecessary views.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">7. Use keyExtractor prop<\/h2>\n\n\n\n<p>keyExtractor prop is used to keep track of the list items. This is helpful when you are adding or removing items dynamically to the list. As a rule of thumb in react, Always use keys for your list items. So make sure to use keyExtractor or pass a key prop to your list item.<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"565\" src=\"https:\/\/codingislove.com\/wp-content\/uploads\/2020\/07\/flatlist-arrow-functions-do-1024x565.png\" alt=\"flatlist react native with keyExtractor prop\" class=\"wp-image-3538\" srcset=\"https:\/\/codingislove.com\/wp-content\/uploads\/2020\/07\/flatlist-arrow-functions-do-1024x565.png 1024w, https:\/\/codingislove.com\/wp-content\/uploads\/2020\/07\/flatlist-arrow-functions-do-300x166.png 300w, https:\/\/codingislove.com\/wp-content\/uploads\/2020\/07\/flatlist-arrow-functions-do-768x424.png 768w, https:\/\/codingislove.com\/wp-content\/uploads\/2020\/07\/flatlist-arrow-functions-do.png 1456w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure><\/div>\n\n\n\n<h2 class=\"wp-block-heading\">8. Use PureComponent or memo carefully<\/h2>\n\n\n\n<p>PureComponent re-renders a component by shallow comparing the props and re-renders only if  the props have changed. PureComponent is used for class components. React memo is the alternative to PureComponent for functional components.<\/p>\n\n\n\n<p>Using PureComponent or Memo for the list item can be helpful in optimizing the flatlist performance but it can also cause more performance issues sometimes. It depends on the props that are being passed to the list item. If too many props are being passed to the list item then it can only worsen the performance. So be careful while using PureComponent or Memo and decide it based on your list item.<\/p>\n\n\n<!-- \/112371330\/post-rectange -->\r\n<div class=\"ad-wrapper\">\r\n<div id='div-gpt-ad-1595415581471-0' style='width: 300px; height: 250px;'>\r\n  <script>\r\n    googletag.cmd.push(function() { googletag.display('div-gpt-ad-1595415581471-0'); });\r\n  <\/script>\r\n<\/div>\r\n<\/div>\n\n\n\n<h2 class=\"wp-block-heading\">Wrapping up<\/h2>\n\n\n\n<p>These are the 8 ways to optimize react native FlatList. There are few more Flat list props which can have some negligible performance benefits. For example <code>initialNumToRender<\/code> to render less number of items so that first render is faster. <code>updateCellsBatchingPeriod<\/code> to set how frequently the re-renders start on scroll. I personally don&#8217;t use this a lot but it can help in certain scenarios.<\/p>\n\n\n\n<p>Check out other <a aria-label=\"undefined (opens in a new tab)\" href=\"https:\/\/codingislove.com\/tag\/react-native\/\" target=\"_blank\" rel=\"noreferrer noopener\">React native articles<\/a><\/p>\n\n\n\n<p>Check out my top video on <a aria-label=\"undefined (opens in a new tab)\" href=\"https:\/\/www.youtube.com\/watch?v=LdKtugH-sb8\" target=\"_blank\" rel=\"noreferrer noopener\">React native UI<\/a><\/p>\n\n\n\n<p>If you have any questions or feedback then do let me know in the comment section below \u270c\ufe0f<\/p>\n\n\n<!-- \/112371330\/after-post -->\r\n<div class=\"ad-wrapper\">\r\n<div id='div-gpt-ad-1595272670647-0' style='width: 750px; height: 100px;'>\r\n  <script>\r\n    googletag.cmd.push(function() { googletag.display('div-gpt-ad-1595272670647-0'); });\r\n  <\/script>\r\n<\/div>\r\n<\/div>\n<div style=\"margin-top: 15px; margin-bottom: 15px;\" class=\"sharethis-inline-share-buttons\" ><\/div>","protected":false},"excerpt":{"rendered":"<p>FlatList is the component in React native that is used to render a list of items. It works great for basic lists but FlatList will&hellip; <\/p>\n","protected":false},"author":1,"featured_media":3526,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[3,28],"tags":[10,103,73],"class_list":["post-3494","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-tutorials","category-quick-tips-for-developers","tag-javascript","tag-react","tag-react-native"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.0 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>8 ways to optimize React native FlatList performance - Coding is Love<\/title>\n<meta name=\"description\" content=\"React native FlatList can have performance issues sometimes depending on the list causing laggy or janky scroll. Here are 8 ways to optimize flat list!\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/codingislove.com\/optimize-react-native-flatlist-performance\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"8 ways to optimize React native FlatList performance - Coding is Love\" \/>\n<meta property=\"og:description\" content=\"React native FlatList can have performance issues sometimes depending on the list causing laggy or janky scroll. Here are 8 ways to optimize flat list!\" \/>\n<meta property=\"og:url\" content=\"https:\/\/codingislove.com\/optimize-react-native-flatlist-performance\/\" \/>\n<meta property=\"og:site_name\" content=\"Coding is Love\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/facebook.com\/codingislove\/\" \/>\n<meta property=\"article:author\" content=\"https:\/\/www.facebook.com\/ranjithkumar10\" \/>\n<meta property=\"article:published_time\" content=\"2020-07-15T20:28:24+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2020-07-22T11:05:32+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/codingislove.com\/wp-content\/uploads\/2020\/07\/Optimize-flatlist-react-native.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1280\" \/>\n\t<meta property=\"og:image:height\" content=\"720\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Ranjith kumar\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@codingislove\" \/>\n<meta name=\"twitter:site\" content=\"@codingislove\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Ranjith kumar\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/codingislove.com\/optimize-react-native-flatlist-performance\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/codingislove.com\/optimize-react-native-flatlist-performance\/\"},\"author\":{\"name\":\"Ranjith kumar\",\"@id\":\"https:\/\/codingislove.com\/#\/schema\/person\/ecb142505163b016d59bfbe662af587e\"},\"headline\":\"8 ways to optimize React native FlatList performance\",\"datePublished\":\"2020-07-15T20:28:24+00:00\",\"dateModified\":\"2020-07-22T11:05:32+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/codingislove.com\/optimize-react-native-flatlist-performance\/\"},\"wordCount\":960,\"commentCount\":13,\"publisher\":{\"@id\":\"https:\/\/codingislove.com\/#organization\"},\"image\":{\"@id\":\"https:\/\/codingislove.com\/optimize-react-native-flatlist-performance\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/codingislove.com\/wp-content\/uploads\/2020\/07\/Optimize-flatlist-react-native.png\",\"keywords\":[\"Javascript\",\"React\",\"React Native\"],\"articleSection\":[\"Coding Tutorials\",\"Quick tips for developers\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/codingislove.com\/optimize-react-native-flatlist-performance\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/codingislove.com\/optimize-react-native-flatlist-performance\/\",\"url\":\"https:\/\/codingislove.com\/optimize-react-native-flatlist-performance\/\",\"name\":\"8 ways to optimize React native FlatList performance - Coding is Love\",\"isPartOf\":{\"@id\":\"https:\/\/codingislove.com\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/codingislove.com\/optimize-react-native-flatlist-performance\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/codingislove.com\/optimize-react-native-flatlist-performance\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/codingislove.com\/wp-content\/uploads\/2020\/07\/Optimize-flatlist-react-native.png\",\"datePublished\":\"2020-07-15T20:28:24+00:00\",\"dateModified\":\"2020-07-22T11:05:32+00:00\",\"description\":\"React native FlatList can have performance issues sometimes depending on the list causing laggy or janky scroll. Here are 8 ways to optimize flat list!\",\"breadcrumb\":{\"@id\":\"https:\/\/codingislove.com\/optimize-react-native-flatlist-performance\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/codingislove.com\/optimize-react-native-flatlist-performance\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/codingislove.com\/optimize-react-native-flatlist-performance\/#primaryimage\",\"url\":\"https:\/\/codingislove.com\/wp-content\/uploads\/2020\/07\/Optimize-flatlist-react-native.png\",\"contentUrl\":\"https:\/\/codingislove.com\/wp-content\/uploads\/2020\/07\/Optimize-flatlist-react-native.png\",\"width\":1280,\"height\":720},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/codingislove.com\/optimize-react-native-flatlist-performance\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Coding is Love\",\"item\":\"https:\/\/codingislove.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Coding Tutorials\",\"item\":\"https:\/\/codingislove.com\/category\/tutorials\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"8 ways to optimize React native FlatList performance\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/codingislove.com\/#website\",\"url\":\"https:\/\/codingislove.com\/\",\"name\":\"Coding is Love\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\/\/codingislove.com\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/codingislove.com\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/codingislove.com\/#organization\",\"name\":\"Coding is Love\",\"url\":\"https:\/\/codingislove.com\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/codingislove.com\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/codingislove.com\/wp-content\/uploads\/2015\/12\/codinglovenew.png\",\"contentUrl\":\"https:\/\/codingislove.com\/wp-content\/uploads\/2015\/12\/codinglovenew.png\",\"width\":300,\"height\":225,\"caption\":\"Coding is Love\"},\"image\":{\"@id\":\"https:\/\/codingislove.com\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/facebook.com\/codingislove\/\",\"https:\/\/x.com\/codingislove\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/codingislove.com\/#\/schema\/person\/ecb142505163b016d59bfbe662af587e\",\"name\":\"Ranjith kumar\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/codingislove.com\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/f5486247269539c638227e6213187139cc7460eeb16d789fa757485f1d2b87f0?s=96&d=wavatar&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/f5486247269539c638227e6213187139cc7460eeb16d789fa757485f1d2b87f0?s=96&d=wavatar&r=g\",\"caption\":\"Ranjith kumar\"},\"description\":\"A CA- by education, self taught coder by passion, loves to explore new technologies and believes in learn by doing.\",\"sameAs\":[\"https:\/\/www.facebook.com\/ranjithkumar10\",\"https:\/\/www.instagram.com\/livin_on_d_edge\/\",\"https:\/\/www.linkedin.com\/in\/ranjithkumar10\",\"https:\/\/www.youtube.com\/c\/codingislove01\"],\"url\":\"https:\/\/codingislove.com\/author\/ranjithkumar10\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"8 ways to optimize React native FlatList performance - Coding is Love","description":"React native FlatList can have performance issues sometimes depending on the list causing laggy or janky scroll. Here are 8 ways to optimize flat list!","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/codingislove.com\/optimize-react-native-flatlist-performance\/","og_locale":"en_US","og_type":"article","og_title":"8 ways to optimize React native FlatList performance - Coding is Love","og_description":"React native FlatList can have performance issues sometimes depending on the list causing laggy or janky scroll. Here are 8 ways to optimize flat list!","og_url":"https:\/\/codingislove.com\/optimize-react-native-flatlist-performance\/","og_site_name":"Coding is Love","article_publisher":"https:\/\/facebook.com\/codingislove\/","article_author":"https:\/\/www.facebook.com\/ranjithkumar10","article_published_time":"2020-07-15T20:28:24+00:00","article_modified_time":"2020-07-22T11:05:32+00:00","og_image":[{"width":1280,"height":720,"url":"https:\/\/codingislove.com\/wp-content\/uploads\/2020\/07\/Optimize-flatlist-react-native.png","type":"image\/png"}],"author":"Ranjith kumar","twitter_card":"summary_large_image","twitter_creator":"@codingislove","twitter_site":"@codingislove","twitter_misc":{"Written by":"Ranjith kumar","Est. reading time":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/codingislove.com\/optimize-react-native-flatlist-performance\/#article","isPartOf":{"@id":"https:\/\/codingislove.com\/optimize-react-native-flatlist-performance\/"},"author":{"name":"Ranjith kumar","@id":"https:\/\/codingislove.com\/#\/schema\/person\/ecb142505163b016d59bfbe662af587e"},"headline":"8 ways to optimize React native FlatList performance","datePublished":"2020-07-15T20:28:24+00:00","dateModified":"2020-07-22T11:05:32+00:00","mainEntityOfPage":{"@id":"https:\/\/codingislove.com\/optimize-react-native-flatlist-performance\/"},"wordCount":960,"commentCount":13,"publisher":{"@id":"https:\/\/codingislove.com\/#organization"},"image":{"@id":"https:\/\/codingislove.com\/optimize-react-native-flatlist-performance\/#primaryimage"},"thumbnailUrl":"https:\/\/codingislove.com\/wp-content\/uploads\/2020\/07\/Optimize-flatlist-react-native.png","keywords":["Javascript","React","React Native"],"articleSection":["Coding Tutorials","Quick tips for developers"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/codingislove.com\/optimize-react-native-flatlist-performance\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/codingislove.com\/optimize-react-native-flatlist-performance\/","url":"https:\/\/codingislove.com\/optimize-react-native-flatlist-performance\/","name":"8 ways to optimize React native FlatList performance - Coding is Love","isPartOf":{"@id":"https:\/\/codingislove.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/codingislove.com\/optimize-react-native-flatlist-performance\/#primaryimage"},"image":{"@id":"https:\/\/codingislove.com\/optimize-react-native-flatlist-performance\/#primaryimage"},"thumbnailUrl":"https:\/\/codingislove.com\/wp-content\/uploads\/2020\/07\/Optimize-flatlist-react-native.png","datePublished":"2020-07-15T20:28:24+00:00","dateModified":"2020-07-22T11:05:32+00:00","description":"React native FlatList can have performance issues sometimes depending on the list causing laggy or janky scroll. Here are 8 ways to optimize flat list!","breadcrumb":{"@id":"https:\/\/codingislove.com\/optimize-react-native-flatlist-performance\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/codingislove.com\/optimize-react-native-flatlist-performance\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/codingislove.com\/optimize-react-native-flatlist-performance\/#primaryimage","url":"https:\/\/codingislove.com\/wp-content\/uploads\/2020\/07\/Optimize-flatlist-react-native.png","contentUrl":"https:\/\/codingislove.com\/wp-content\/uploads\/2020\/07\/Optimize-flatlist-react-native.png","width":1280,"height":720},{"@type":"BreadcrumbList","@id":"https:\/\/codingislove.com\/optimize-react-native-flatlist-performance\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Coding is Love","item":"https:\/\/codingislove.com\/"},{"@type":"ListItem","position":2,"name":"Coding Tutorials","item":"https:\/\/codingislove.com\/category\/tutorials\/"},{"@type":"ListItem","position":3,"name":"8 ways to optimize React native FlatList performance"}]},{"@type":"WebSite","@id":"https:\/\/codingislove.com\/#website","url":"https:\/\/codingislove.com\/","name":"Coding is Love","description":"","publisher":{"@id":"https:\/\/codingislove.com\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/codingislove.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/codingislove.com\/#organization","name":"Coding is Love","url":"https:\/\/codingislove.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/codingislove.com\/#\/schema\/logo\/image\/","url":"https:\/\/codingislove.com\/wp-content\/uploads\/2015\/12\/codinglovenew.png","contentUrl":"https:\/\/codingislove.com\/wp-content\/uploads\/2015\/12\/codinglovenew.png","width":300,"height":225,"caption":"Coding is Love"},"image":{"@id":"https:\/\/codingislove.com\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/facebook.com\/codingislove\/","https:\/\/x.com\/codingislove"]},{"@type":"Person","@id":"https:\/\/codingislove.com\/#\/schema\/person\/ecb142505163b016d59bfbe662af587e","name":"Ranjith kumar","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/codingislove.com\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/f5486247269539c638227e6213187139cc7460eeb16d789fa757485f1d2b87f0?s=96&d=wavatar&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/f5486247269539c638227e6213187139cc7460eeb16d789fa757485f1d2b87f0?s=96&d=wavatar&r=g","caption":"Ranjith kumar"},"description":"A CA- by education, self taught coder by passion, loves to explore new technologies and believes in learn by doing.","sameAs":["https:\/\/www.facebook.com\/ranjithkumar10","https:\/\/www.instagram.com\/livin_on_d_edge\/","https:\/\/www.linkedin.com\/in\/ranjithkumar10","https:\/\/www.youtube.com\/c\/codingislove01"],"url":"https:\/\/codingislove.com\/author\/ranjithkumar10\/"}]}},"jetpack_publicize_connections":[],"jetpack_featured_media_url":"https:\/\/codingislove.com\/wp-content\/uploads\/2020\/07\/Optimize-flatlist-react-native.png","amp_enabled":true,"_links":{"self":[{"href":"https:\/\/codingislove.com\/wp-json\/wp\/v2\/posts\/3494","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/codingislove.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/codingislove.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/codingislove.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/codingislove.com\/wp-json\/wp\/v2\/comments?post=3494"}],"version-history":[{"count":0,"href":"https:\/\/codingislove.com\/wp-json\/wp\/v2\/posts\/3494\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/codingislove.com\/wp-json\/wp\/v2\/media\/3526"}],"wp:attachment":[{"href":"https:\/\/codingislove.com\/wp-json\/wp\/v2\/media?parent=3494"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/codingislove.com\/wp-json\/wp\/v2\/categories?post=3494"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/codingislove.com\/wp-json\/wp\/v2\/tags?post=3494"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}