Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
import * as React from "react"
import {captureScroll, getSpoingyTransform} from "spoingyHelpers"
import {Animated} from "react-native"
const headerHeight = 300
export default () => {
// use an instance variable if using component classes
const scrollY = React.useRef(new Animated.Value(0)).current
return <Animated.ScrollView {...captureScroll(scrollY)}>
width: theme.dimensions.width,
height: headerHeight,
transform: getSpoingyTransform(scrollY, headerHeight),
<OtherContentHere />
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment