Skip to content

Instantly share code, notes, and snippets.

@kkkevinnn
kkkevinnn / hideOnScroll.js
Last active August 25, 2020 18:19 — forked from mmazzarolo/hideOnScroll.js
react-native-action-button hide on scroll
// 1. Define a state variable for showing/hiding the action-button
state = {
isActionButtonVisible: true
}
// 2. Define variables those will keep track of the current scroll position, height and content height
_listViewOffset = 0
_listViewHeight = 0
_listViewContentHeight = 0