Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

149
Vistas
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 la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda