i am using react native reanimated. I cant change animation value passing different props to component. This is my expo code : expo code
Actually i want change the min
variable inside my snappable.js
components to props.minValue
so i can change the animation dynamically.
const min = props.minDist ? props.minDist : 0
The first time the component gets the prop but after it seems not change anymore.
Here how i pass the prop to Snappable component.
<View style={styles.container}>
<Snappable minValue={this.state.min}/>
<TouchableOpacity
style={styles.touch}
onPress={() => this.setState({min: 0})}>
<Text>Change Props</Text>
</TouchableOpacity>
</View>
Thanks in advance.