en mi aplicación nativa de reacción, cuando la posición de desplazamiento es superior a 0, quiero animar suavemente una vista de círculo para que sea un 25% más pequeña:
transform: [{ scaleX: .8 }, { scaleY: .8 }]cuando el usuario se desplaza hacia arriba, quiero que el círculo se anime suavemente de nuevo al tamaño normal:
//import * as React from 'react'; import { View, Animated, ScrollView } from 'react-native'; import React, { useState, useEffect,useRef } from 'react' export default CustomScrollBarOverNormalScrollBar = (props) => { const onScroll = () => { console.log('User scrolled'); }; return( <View style={{flex:1}}> <ScrollView showsVerticalScrollIndicator={false} scrollEventThrottle={16} style={{flex:1,backgroundColor:'white',position:'relative'}} onScroll={onScroll}> <View style={{ width:'100%', height:700, backgroundColor:'rgb(235,235,235)' }}></View> </ScrollView> <View style={{width:'100%',height:100,position:'absolute',bottom:0,left:0, alignItems:'center',justifyContent:'center'}}> {/*TI WANT TO SCALE THIS CIRCLE*/} <View style={{ width:100,height:100,borderRadius:100%2,backgroundColor:'red' }}> </View> {/*I WANT TO SCALE THIS CIRCLE*/} </View> </View> ); };