import React, { Component } from 'react'; import { StyleSheet, View, ScrollView, Dimensions } from 'react-native'; import Animated from 'react-native-reanimated'; import Interactable from '../../Interactable'; const Screen = { height: Dimensions.get('window').height - 75, }; export default class CollapsingHeaderWithScroll extends Component { constructor(props) { super(props); this._deltaY = new Animated.Value(0); this.state = { canScroll: false, }; } render() { return ( ); } onSnap(event) { const { id } = event.nativeEvent; if (id === 'bottom') { this.setState({ canScroll: true }); alert('This implementation is still broken, in progress'); } } onScroll(event) { const { contentOffset } = event.nativeEvent; if (contentOffset.y === 0) { this.setState({ canScroll: false }); } } } const styles = StyleSheet.create({ container: { flex: 1, backgroundColor: 'white', }, placeholder: { backgroundColor: 'yellow', flex: 1, height: 120, marginHorizontal: 20, marginTop: 20, }, });