mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
708038d80e
Summary: Refactor EventEmitters to take an optional SurfaceId that Fabric will use, and non-Fabric will not. Migrating touches is a good proof-of-concept for how this could be used generally, and as it turns out, TouchEvent's API is more flexible than most other event APIs (because it uses a dictionary to pass data around, so we can just stuff SurfaceId into it - not efficient, but flexible). All new APIs are backwards-compatible and designed to work with old-style events, with Fabric and non-Fabric. Native Views that migrate to the new API will be backwards-compatible and get an efficiency boost in Fabric. Changelog: [Internal] Reviewed By: mdvacca Differential Revision: D26025135 fbshipit-source-id: 5b418951e9d0a3882f2d67398f2aaadac8a3a556