I would like to change a value when a fadeOut function is over.
I have the following function:
const fadeOut = (duration: number = 300) => { Animated.timing( opacity, { toValue: 0, duration, useNativeDriver: true } ).start(); }
And I call it this way:
const fadeOutScreen = () => { fadeOut(1000); // The value would be true when the fadeOut is over setHide(true); }
But the value is changed before the operation ends.
How can I solve this?