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

199
Views
Objects are not valid as a React child. If you meant to render a collection of children, use an array instead - FlatList

React-native Expo CLI ,FlatList I'm trying use a FlatList. but its showing me error as-

  • Error: Objects are not valid as a React child (found: object with keys {seconds, nanoseconds}). If you meant to render a collection of children, use an array instead.

faltList code

{
 (PostLoaded)?<FlatList
  data = {PostData}
  keyExtractor = {item => item.key}
  renderItem={(itemData) => {
    const PostInfo = itemData.item;
    // console.log(PostInfo.Name);
    return(
      <View style={style.petshowContainer}>
        <Image source={{uri:PostInfo.Image}}
          style={{width:150,height:175,borderTopLeftRadius:10,borderBottomLeftRadius:10,}}
          resizeMode='cover'
        />
       <View style={{margin:10}}>
       <Text style={{fontSize:25}}>{PostInfo.Name}</Text>
       <View style={{flexDirection:'row',alignItems:'center'}}>
       <Text style={{fontSize:15,marginRight:20}}>{PostInfo.Age}/ {PostInfo.Breed}</Text>
       <Button mode='outlined' style={{borderColor:'blue'}}>{PostInfo.Gender}</Button>
    </View>
   <Text style={{marginBottom:5}}>Available for : </Text>
   <Text>{PostInfo.From_Date} - 11/10/2021</Text>
   <Button mode="contained" style={{marginTop:10}}>PetME</Button>
     </View>
    </View>
    )
}}
  style={{backgroundColor:'red'}}
  />:<Text>loading...</Text>
}

And Post Data is an array contains object received from firebase

PostData = [{name:"narendra",Age:5.......},{.....}]
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

this was caused beacuse of wrong date formate

<Text>{PostInfo.From_Date} - 11/10/2021</Text>
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!