Skip to content

Pager events still use the legacy dispatch fallback instead of surface-aware Fabric events #1116

Description

@OskarEichler

At master 7926b28, all three Android pager events use Event(viewTag) with surfaceId=-1 and override dispatch instead of getEventData. RN Event.dispatchModern therefore falls back to the deprecated emitter path, and its forwarding layer discards the scroll coalescing flag. Proposed modernization: pass UIManagerHelper.getSurfaceId from the view, implement getEventData, preserve existing constructors as overloads, keep selected/state transitions noncoalescing, and allow only scroll updates to coalesce as already declared by the event class. Actual RN 0.87.1 Event source plus the package event classes compile/run in a JVM harness; existing payload/non-finite-offset controls pass and none of the baseline classes accepts a surface-aware constructor. This is a routing/coalescing improvement, not a measured frame-rate claim. This source audit is AI-assisted.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions