mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-12-03 19:51:53 +00:00
Adding useNativeDriver to EventConfig (#18302)
The AnimatedEvent class's constructor takes in a config parameter of type EventConfig. This config object is passed to shouldUseNativeDriver, which only returns something other than false if useNativeDriver is ever set. A case when useNativeDriver is set to true is when Animated.Event is used for an Animated.ScrollView's onScroll prop. https://facebook.github.io/react-native/blog/2017/02/14/using-native-driver-for-animated.html
This commit is contained in:
Vendored
+2
-1
@@ -8057,7 +8057,8 @@ export namespace Animated {
|
||||
|
||||
type Mapping = { [key: string]: Mapping } | AnimatedValue;
|
||||
interface EventConfig {
|
||||
listener?: ValueListenerCallback
|
||||
listener?: ValueListenerCallback;
|
||||
useNativeDriver?: boolean;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user