Skip to content

Instantly share code, notes, and snippets.

@damikdk
damikdk / hideOnScroll.js
Last active December 4, 2020 07:14 — forked from mmazzarolo/hideOnScroll.js
react-native-action-button hide/show view on scroll down/scroll up
// 1. Define a state variable for showing/hiding the action-button
state = {
shouldShow: false,
}
// 2. Define a variable that will keep track of the current scroll position
_scrollOffset = 0
// 3. Add an onScroll listener to your listview/scrollview
<ScrollView