2023-05-23
3211
#react native
Hussain Arif
62541
May 23, 2023 â‹… 11 min read

A deep dive into React Native FlatList

Hussain Arif Hussain is a CS student in Pakistan whose biggest interest is learning and teaching programming to make the world a better place.

Recent posts:

master state management hydration Nuxt usestate

Nuxt state management and hydration with useState

useState can effectively replace ref in many scenarios and prevent Nuxt hydration mismatches that can lead to unexpected behavior and errors.

Yan Sun
Jan 20, 2025 â‹… 8 min read
React Native List Components: FlashList, FlatList, And More

React Native list components: FlashList, FlatList, and more

Explore the evolution of list components in React Native, from `ScrollView`, `FlatList`, `SectionList`, to the recent `FlashList`.

Chimezie Innocent
Jan 16, 2025 â‹… 4 min read
Building An AI Agent For Your Frontend Project

Building an AI agent for your frontend project

Explore the benefits of building your own AI agent from scratch using Langbase, BaseUI, and Open AI, in a demo Next.js project.

Ivaylo Gerchev
Jan 15, 2025 â‹… 12 min read
building UI sixty seconds shadcn framer ai

Building a UI in 60 seconds with Shadcn and Framer AI

Demand for faster UI development is skyrocketing. Explore how to use Shadcn and Framer AI to quickly create UI components.

Peter Aideloje
Jan 14, 2025 â‹… 6 min read
View all posts

7 Replies to "A deep dive into React Native <code>FlatList</code>"

    1. Anonymous functions for the ‘keyExtractor’ prop are alright. This is because they don’t get re-rendered repeatedly, so there’s no performance costs

  1. Certainly everything but a deep dive.. you just showed an example of usage. As for FlatList, the most buggy component in all React Native, I highly recommend you not to talk about FlatList as a “rock solid” component. I was excepting a deep dive into the component itself and how to avoid at least the rendering issues, the images not loading within the FlatList items etc.. just a very beginner’s guide, which is great for beginners, but change the title, it’s totally misleading.

    1. Hi Vahradrim, thank you for taking the time to read my post! I didn’t research properly and that’s my fault.
      I’ve now updated my article and would like to know your thoughts.

  2. Hi, what if the array that im showing is extracted from firebase and I don’t know what is the key value pair of the object, how do we use FlatList as the above examples it is known the keys of each key-value pair?

  3. Hey, thanks for the article. Here is another interesting issue with flat list.
    I have a View, containing flatlist inside a react-navigation tab bar.
    Everything works fine, but when I add a button before flatlist, like this

    ..
    ..

    the last element in the flatlist seems to be hidden behind the tab bar.
    Trying to figure out what is wrong.
    So would be interesting to read about best practises, like don’t use other elements except flatlist on a screen etc.

Leave a Reply