mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Summary: Updates touch events in Fabric to be dispatched through the same pipeline as the rest of events, instead of relying on custom dispatch behavior. Previous method of handling touches was reusing Paper behavior which required: 1. Transform event into a Paper-compatible form of WritableArray and dispatch it to `RCTEventEmitter.receiveTouches`. 2. Intercept `receiveTouches` for Fabric and redirect it to `FabricEventEmitter` 3. Perform transformations copied from Paper JS renderer in Java, transform it to the final form and dispatch this event as usual after. The new behavior uses emitter's `receiveEvent` method directly to dispatch events. Additionally, it should decrease allocations done when transforming events during step 3 above, as `WritableNativeMap`-based operations performed many re-allocations when reading/re-creating arrays. Changelog: [Android][Changed] - Added an experimental touch dispatch path Reviewed By: JoshuaGross Differential Revision: D31280052 fbshipit-source-id: 829c2646ac6b0ebff0f0106159e76d84324ac732
Building React Native for Android
See the docs on the wiki.
Running tests
When you submit a pull request CircleCI will automatically run all tests. To run tests locally, see Testing.