Commit 2957b27
Support Animated.ScrollView with Animated.event() (#264)
Hi,
Current implementation does not support passing a onScroll listener using `Animated.event()` listener, which is particularly useful when you want to implement a ScrollView with native driver parallax effects or things like that.
I just discovered there's this "Animated.forkEvent" method which permit to add a listener to the existing user onScroll callback. It works with both original function and Animated.event(): https://github.com/facebook/react-native/blob/c6b96c0df789717d53ec520ad28ba0ae00db6ec2/Libraries/Animated/src/AnimatedImplementation.js#L4771 parent 2eb1363 commit 2957b27
1 file changed
+4
-11
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
| 10 | + | |
| 11 | + | |
11 | 12 | | |
12 | 13 | | |
13 | 14 | | |
| |||
81 | 82 | | |
82 | 83 | | |
83 | 84 | | |
84 | | - | |
85 | 85 | | |
86 | 86 | | |
87 | 87 | | |
| |||
382 | 382 | | |
383 | 383 | | |
384 | 384 | | |
385 | | - | |
386 | | - | |
387 | | - | |
388 | | - | |
389 | | - | |
390 | | - | |
391 | | - | |
392 | 385 | | |
393 | | - | |
| 386 | + | |
394 | 387 | | |
395 | 388 | | |
396 | 389 | | |
| |||
419 | 412 | | |
420 | 413 | | |
421 | 414 | | |
422 | | - | |
| 415 | + | |
423 | 416 | | |
424 | 417 | | |
425 | 418 | | |
| |||
0 commit comments