Created
August 9, 2020 19:54
-
-
Save reime005/219449c5b55f8e015c0e47732aace254 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export default Example = () => { | |
const [contentOffset, setContentOffset] = React.useState({ x: 0, y: 0 }); | |
const [contentSize, setContentSize] = React.useState(0); | |
return( | |
<ScrollView | |
onScroll={e => { | |
setContentOffset(e.nativeEvent.contentOffset); | |
}} | |
onContentSizeChange={(_, height) => { | |
setContentSize(height); | |
}} | |
>... | |
</ScrollView> | |
); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment