question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

scrollEventThrottle has no effect on SectionList

See original GitHub issue

scrollEventThrottle doesn’t seem to make any difference when applied to SectionList. It works as expected with ScrollView.

Environment

Environment: OS: macOS High Sierra 10.13.3 Node: 8.9.4 Yarn: 1.2.1 npm: 5.6.0 Watchman: 4.9.0 Xcode: Xcode 9.2 Build version 9C40b Android Studio: 3.0 AI-171.4443003

Packages: (wanted => installed) react: ^16.3.0-alpha.1 => 16.3.0-alpha.2 react-native: 0.54.2 => 0.54.2

Steps to Reproduce

export default class App extends Component<Props> {
  render() {
    return (
      <View style={styles.container}>
        <ScrollView
          scrollEventThrottle={ 1000 }
          onScroll={ e => console.log( Date.now() ) }
        >
          <Text>ScrollView Text</Text>
        </ScrollView>


        <SectionList
          renderItem={ ( { item } ) => <Text>SectionList Text</Text> }
          sections={ [ {
            title: 'section title',
            data: [ 'item' ]
          } ] }
          scrollEventThrottle={ 1000 }
          onScroll={ e => console.log( Date.now() ) }
        />
      </View>
    );
  }
}

Expected Behavior

The events logged to the console should have at least 1000ms between them.

Actual Behavior

SectionList logs events at high rates regardless of the value passed to scrollEventThrottle

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:4
  • Comments:9 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
BrodaNoelcommented, Jun 21, 2019

This has effect even in <ScrollView>: https://snack.expo.io/rkgPA5FkH

0reactions
stale[bot]commented, Sep 26, 2019

Closing this issue after a prolonged period of inactivity. If this issue is still present in the latest release, please feel free to create a new issue with up-to-date information.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Get current scroll position of ScrollView in React Native
Fires while the user is dragging or while the scroll view is gliding, at some frequency determined by scrollEventThrottle and at most once ......
Read more >
Common bugs in React Native ScrollView and how to fix them
React Native's ScrollView component is ubiquitous, but its implementation can sometimes lead to mistakes. Learn what to look out for here.
Read more >
ScrollView // React Native for Web - GitHub Pages
ScrollView must have a bounded height: either set the height of the view ... is larger than the scroll view, this property has...
Read more >
ScrollView - React Native
FlatList renders items lazily, when they are about to appear, and removes items that scroll way off screen to save memory and processing...
Read more >
ScrollRef - You.i TV Developer Portal
These props only work with You.i React Native and the After Effects workflow. ... Similar to scrollEventThrottle prop of Facebook React Native ScrollView ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found