OptiView Ads SDK for React Native
    Preparing search index...

    Interface ReactVideoTargetEvent

    Runtime shape of a react-native-video event payload.

    Every event the native view dispatches (e.g. onLoad) carries the dispatching view's React tag as target at runtime, but the field is absent from the library's typed payloads (OnLoadData etc.) — which is why extracting it used to require an as unknown as { target: number } cast. The optional target plus the index signature make any of those payloads assignable without a cast — with target? alone, TypeScript's weak-type check rejects payload types like OnLoadData that share no declared property with this interface.

    interface ReactVideoTargetEvent {
        target?: unknown;
        readonly [key: string]: unknown;
    }

    Indexable

    • readonly [key: string]: unknown
    Index
    target?: unknown

    The React tag of the dispatching view, when the payload carries one.