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

147
Visualizações
Is it possible to render specific indexes in React native's VirtualizedList?

I have this long VirtualizedList in my React Native project:

    <VirtualizedList
        horizontal
        data={pages}
        pagingEnabled
        windowSize={2}
        initialNumToRender={3}
        maxToRenderPerBatch={1}
        initialScrollIndex={page}
        onMomentumScrollEnd={onScrollEnd}
        getItemCount={data => data.length}
        keyExtractor={(_, i) => i + ''}
        getItemLayout={(_, index) => ({
            length: width,
            offset: width * index,
            index
        })}
        getItem={(_, index) => ({index})}
        renderItem={renderPage}
    />

Right now, it is rendering 3 items before and 2 items after the current page.

My question is:

Can you specify exactly which indexes should be rendered?

Because i have a header that lets the user jump to a specific index, and i can anticipate which index could be next.

about 4 years ago · Juan Pablo Isaza
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