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

218
Views
How to get current index of snapped item in flatlist after it has stopped?

How do I get the current index of item at which the flatlist has stopped scrolling at and has snapped to?

const Scrollref=useRef();

<FlatList
    data={Data}
    ref={Scrollref}
    renderItem={...}
    keyExtractor={...}
    getItemLayout={...}
    initialScrollIndex={initialScrollIndex}
    initialNumToRender={3}
    snapToOffsets={Data.map((x, i) => (i*ITEM_HEIGHT))}
/>

I used this solution and although it does give the key index from viewableItems, it returns so on everytime the view is changed which seems very inefficient

is there anyway to get the key after the scrolling has stopped? maybe using onMomentumScrollEnd?

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!