what onEndReachedThreshold really means in react-native

前端 未结 4 922
轮回少年
轮回少年 2021-02-18 13:07

from documentation:

onEndReachedThreshold number

Threshold in pixels (virtual, not physical) for calling onEndReached. so I just w

4条回答
  •  清歌不尽
    2021-02-18 13:21

    The documentation is always the best way to go:

    onEndReached function
    Called when all rows have been rendered and the list has been scrolled to within onEndReachedThreshold of the bottom. The native scroll event is provided.

    onEndReachedThreshold number
    Threshold in pixels (virtual, not physical) for calling onEndReached.

    So as I see it: if you do onEndReachedThreshold ={10} it calls onEndReached if you scrolled to 10 pixels from the bottom

提交回复
热议问题