Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

451
Views
ReactNative FlatList nested inside FlatList

I want to do something like this https://i.stack.imgur.com/SlbKX.png. If you need more information,please let me know! Hope someone can help me!

`const DATA=[[1,name1,...],[2,name2,...]...];// Data like [[...],[...],...]
<FlatList
    data={DATA}  
    keyExtractor={(outterItem)=>outterItem.key}
    renderItem={({outterItem})=>(                                                                          
    <View>
        <FlatList
              horizontal={true}
              data={outterItem}
              keyExtractor={(innerItem)=>innerItem.key}
              renderItem={({InnerItem})=>(  
                  <View style={styles.box}>
                      <Text style={styles.Text}>{InnerItem}</Text>
                   </View>
              )}   
         />
    </View>

  />



`
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

You are destructuring the item parameter of the renderItem function of FlatList. You cannot rename it to innerItem or outerItem. The name must be item for both. Thre will be no conflict since the item parameter will be inside the local scope.

Here is a working version with a dummy data array.

export default function App() {
  const DATA=[[1,2,3],[2, 3, 4 ,5]];
  return (
  <FlatList
    data={DATA}  
    keyExtractor={(item, index)=>index.toString()}
    renderItem={({item})=>(                                                                          
    <View>
        <FlatList
              horizontal={true}
              data={item}
              keyExtractor={(item, index)=> index.toString()}
              renderItem={({item})=> (  
                  <View style={styles.box}>
                      <Text style={styles.Text}>{item}</Text>
                   </View>
              )}   
         />
    </View>)} 
  />)
}
about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!