0
0
React Nativemobile~5 mins

Infinite scrolling (onEndReached) in React Native - Cheat Sheet & Quick Revision

Choose your learning style9 modes available
Recall & Review
beginner
What is infinite scrolling in a mobile app?
Infinite scrolling is a way to load more content automatically when the user scrolls near the end of a list, so they don’t have to tap a button to see more.
Click to reveal answer
beginner
In React Native, which prop triggers loading more data when the user scrolls near the end of a FlatList?
The onEndReached prop triggers a function when the user scrolls close to the end of the list.
Click to reveal answer
intermediate
Why should you use a loading state when implementing infinite scrolling?
A loading state prevents multiple data requests at the same time and shows the user that new content is loading.
Click to reveal answer
intermediate
What is a common problem if you don’t set onEndReachedThreshold properly?
If the threshold is too low or too high, onEndReached may trigger too early or too late, causing bad user experience or repeated loading.
Click to reveal answer
intermediate
How can you avoid loading the same data multiple times in infinite scrolling?
Use a flag like loading to block new requests until the current one finishes, and update your data list carefully.
Click to reveal answer
What does the onEndReached prop do in a React Native FlatList?
ATriggers a function when the user scrolls near the end of the list
BStops the list from scrolling
CRefreshes the list when pulled down
DChanges the list layout
Which prop controls how close to the end the onEndReached event fires?
AonScroll
BonEndReachedThreshold
CscrollEnabled
DinitialNumToRender
Why is it important to have a loading state when implementing infinite scrolling?
ATo prevent multiple simultaneous data fetches
BTo change the background color
CTo disable scrolling
DTo reset the list
What happens if you don’t handle onEndReached properly?
AThe list becomes unscrollable
BThe list never loads any data
CThe app crashes immediately
DYou might load data repeatedly or too late
Which React Native component is commonly used with onEndReached for infinite scrolling?
ATextInput
BScrollView
CFlatList
DButton
Explain how infinite scrolling works in React Native using FlatList and onEndReached.
Think about how the app knows when to load more items as you scroll.
You got /4 concepts.
    Describe common challenges when implementing infinite scrolling and how to solve them.
    Consider what happens if the app loads data too often or too late.
    You got /4 concepts.