Skip to content

Instantly share code, notes, and snippets.

@bogoslavskiy
Created July 8, 2018 21:16
Show Gist options
  • Save bogoslavskiy/f1077b631e8f67325f0492b667ace2e9 to your computer and use it in GitHub Desktop.
Save bogoslavskiy/f1077b631e8f67325f0492b667ace2e9 to your computer and use it in GitHub Desktop.
class FlatListHelper extends React.PureComponent {
[...]
_onMomentumScrollBegin = () => this.props._canJumpToTab(false);
_onMomentumScrollEnd = () => this.props._canJumpToTab(true);
[...]
render() {
return (
<AnimatedFlatList
[...]
onMomentumScrollBegin={this._onMomentumScrollBegin}
onMomentumScrollEnd={this._onMomentumScrollEnd}
[...]
/>
);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment