mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Use dispatch unique for events that can be coalesced
Summary: Event merging or "coalescing" is done on Java side from Android, but Fabric also includes some Cxx logic to merge those events. Although Android doesn't need this logic in particular, it is important to follow this path to ensure these events (e.g. scroll) are dispatched as "continuous", allowing for correct prioritization in Concurrent Mode. `dispatchModernV2` selects between `dispatch` and `dispatchUnique` based on the `canBeCoalesced` parameter of the event, which is exactly what we need. The logic is only used in the "new" event dispatcher at the moment, so I wrapped it with feature flag to validate it doesn't cause any regressions. Changelog: [Android][Internal] - Try dispatching coalescing events as unique to Fabric Reviewed By: sammy-SC Differential Revision: D31272585 fbshipit-source-id: 6b67b61bd13fbff019d9eb8c5172bdd814a7b5b8
This commit is contained in:
committed by
Facebook GitHub Bot
parent
8491edec28
commit
086c967286
@@ -101,4 +101,6 @@ public class ReactFeatureFlags {
|
||||
public static boolean insertZReorderBarriersOnViewGroupChildren = true;
|
||||
|
||||
public static boolean enableScrollViewSnapToAlignmentProp = true;
|
||||
|
||||
public static boolean useDispatchUniqueForCoalescableEvents = false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user