To have access to the value of native Animated.Value I needed to add a no-op listener to it.
In order to avoid re-renders on every frame, which defeats the purpose of using the native driver, I arbitrarily chose to delay the render by 64 milliseconds on every event. This seems to work okay, but I'm not sure if it's the best solution.
Summary:
This PR is doing essentially the same thing as https://github.com/facebook/react-native/pull/37836, but for animated events instead of the animations.
The two kind of sketchy things I did are:
Animated.Value
I needed to add a no-op listener to it.Fixes https://github.com/facebook/react-native/issues/36504
Changelog:
[GENERAL] [FIXED] - When a stream of
Animated.Event
pauses, trigger re-render to update Pressability responder regionsTest Plan:
Tested on the reproducer from the issue