You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jun 11, 2026. It is now read-only.
Repository navigation
This repository was archived by the owner on Jun 11, 2026. It is now read-only.
RN 0.63 Button compatibility - useNativeDriver was not specified #1227
David de Regt (@deregtd) that sounds like the right plan. -- I wish there was a cleaner API from react-native that would tell us if a particular Animation supports useNativeDriver. Then we could detect those cases and conditionally set the flag.
Ah, I misunderstood the suggestion. That change is okay, since the code appears to only animate opacity specifically in the button. But also we need to change the config's type to be nonoptional now to find any other broken spots.
Reacted by Kristian Gerardsson, Frederic Barthelemy and GolDev
Activity
deregtd commentedon Aug 2, 2020
Not all animations can use native driver, so maybe we just need to force config.useNativeDriver to non-optional in typescript now.
fbartho commentedon Aug 2, 2020
David de Regt (@deregtd) that sounds like the right plan. -- I wish there was a cleaner API from react-native that would tell us if a particular Animation supports
useNativeDriver. Then we could detect those cases and conditionally set the flag.This feels like an API Wart from RN's side.
deregtd commentedon Aug 2, 2020
API warts from react native are a significant portion of the reason ReactXP exists. :)
Frexuz commentedon Aug 3, 2020
But the Button is only animating opacity in
setOpacityTo. Why wouldn't this be ok?// reactxp/src/native-common/Button.tsx setOpacityTo(value: number, duration: number) { Animated.timing( this._opacityAnimatedValue!, { toValue: value, duration: duration, easing: Animated.Easing.InOut(), + useNativeDriver: true, }, ).start(); }deregtd commentedon Aug 3, 2020
Ah, I misunderstood the suggestion. That change is okay, since the code appears to only animate opacity specifically in the button. But also we need to change the config's type to be nonoptional now to find any other broken spots.
fbartho commentedon Aug 9, 2020
Kristian Gerardsson (@Frexuz) -- I think we should do this. Do you want to submit a PR for it?
Frexuz commentedon Aug 10, 2020
Frederic Barthelemy (@fbartho) yep :)