import React, {Component} из'act 'import {View, StyleSheet, Text, Image, ScrollView, Animated} из'act-native';
класс Приложение расширяет компонент {
constructor (props) {super (props) this.state = {scrollY: new Animated.Value (0)}}
render () {
const headerheight = this.state.scrollY.interpolate({
inputRange: [0, 100],
outputRange: [100, 0]
})
return (
<View style={styles.container}>
<Animated.View style={styles.appHeader}>
</Animated.View>
<ScrollView style={styles.scroll}
onScroll={Animated.event([{ nativeEvent: { contentOffset: { Y: this.state.scrollY } } }])}>
<View style={styles.imageView}>
<Image style={styles.image} source={require('./assets/vikalp.jpg')} />
</View>
<View>
<Text style={styles.textHeader}>Vikalp Chakravorty</Text>
</View>
</ScrollView>
</View>
);