Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

197
Visualizações
Reactnative FlatList memory or is very Slow

I have a big Flat List (around 2000 elements) ont the item i have shouldComponentUpdate false so the item doesn't load several times

My FlatList is declared like this <FlatList showsVerticalScrollIndicator={false} inverted data={this.props.dataSourcePr} ref={ref => { this.state.flatListTimeLine = ref; }} renderItem={this.renderItem} onViewableItemsChanged={this.onViewableItemsChanged} viewabilityConfig={{ itemVisiblePercentThreshold: 30, }} keyExtractor={(item, index) => index} initialScrollIndex={this.state.lastIndex} onScrollToIndexFailed={info => {}}

        initialNumToRender={70}
        maxToRenderPerBatch={50}
        onEndReachedThreshold={0.1}
        windowSize={70}
        onScroll={this._onScroll}
        removeClippedSubviews = {true}
      />

How can i avoid crashes problem, and how can i make this FlatList less slow ? how can i tell FlatList to load only shown element on screen ?

any help would be greatly appreciated

about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

Try to add keyExtractor and checkout this article by react-native

about 4 years ago · Juan Pablo Isaza Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda