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

151
Views
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
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!