react-native-animatable
react-native-animatable copied to clipboard
useNativeDriver with Opacity causes Android element to show during Native UI
If i add a useNativeDriver
on an animation view with opacity
as the transition, the View
will show instantly when a native UI is engaged (Android only).
For example, if you trigger Share.share()
an element previously "hidden" with Opacity at 0
becomes instantly visible (no transition).
<Animatable.View
transition="opacity"
style={{
...styles.animated,
...(showStatus ? styles.animatedShow : null),
}}
/useNativeDriver
duration={300}
pointerEvents={!showStatus ? 'none' : null}
>
....
</Animatable.View>
...
const styles = {
animated: {
opacity: 0,
},
animatedShow: {
opacity: 1,
},
}
Removing useNativeDriver
from the animating view "fixes" the issue, but you lose the benefit of the native driver.
Same here! Any update about the issue?
This sounds like a React Native bug to me, would you mind reporting it there?