Welcome to WuJiGu Developer Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
308 views
in Technique[技术] by (71.8m points)

javascript - Component Below Flatlist doens't appear

I've been trying to make a simple app, and I want some comment section that I create with flatlist, but after I create some component below my flatlist it won't appear, but the height of it appears, it just the component itself won't appear, after I'm trying to comment my flatlist, the component below it showed up.

Can you give me solution for this problem? so stuck with it

<View
     style={{
     alignItems: 'center',
     flex: 1,
     }}>
     <FlatList
       data={Comment}
       keyExtractor={Comment.id}
       renderItem={renderItem}
       removeClippedSubviews={true}
       scrollEnabled={false}
      />
   </View>
</View>
              
<View>
   <Timeline data={data} />
 </View>
</View>

<!-- end snippet -->


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

Try this way

<View style={{ flex: 1 }}>
  <View
    style={{
      alignItems: "center",
      flex: 1,
    }}
  >
    <FlatList
      data={Comment}
      keyExtractor={Comment.id}
      renderItem={renderItem}
      removeClippedSubviews={true}
      scrollEnabled={false}
    />
  </View>

  <View>
    <Timeline data={data} />
  </View>
</View>

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to WuJiGu Developer Q&A Community for programmer and developer-Open, Learning and Share

2.1m questions

2.1m answers

62 comments

56.7k users

...