Re-add an eventName field inside Event.kt to unbreak several libraries (#50787)

Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50787

Converting Event from Java to Kotlin resulted in a number of breaking changes for Kotlin
libraries that were using an `.eventName` accessors from the `getEventName()` Java method.

This diff re-adds the `eventName` property without backing field.
This could potentially be disruptive in OSS but only one library is affected:
https://github.com/search?type=code&q=%22import+com.facebook.react.uimanager.events.Event%22+%22val+eventName%3A%22+%22%3A+Event%3C%22+language%3AKotlin+path%3A*Event.kt+NOT+is%3Afork+NOT+org%3Afacebook+NOT+path%3AInteropEvent.kt

Changelog:
[Internal] [Changed] -

Reviewed By: cipolleschi

Differential Revision: D73193202

fbshipit-source-id: a69159950e1ef275c93f265f264525236a19d1db
This commit is contained in:
Nicola Corti authored and Facebook GitHub Bot committed 2025-04-17 13:06:13 -07:00
1 parent 16a61bf2ba
commit f1f2788410
3 files changed
+11 -5

No files matched your search

@@ -5004,6 +5004,7 @@ public abstract class com/facebook/react/uimanager/events/Event {
protected final fun init (I)V
protected final fun init (II)V
protected final fun init (IIJ)V
public final fun internal_getEventNameCompat ()Ljava/lang/String;
public final fun isInitialized ()Z
public fun onDispose ()V
}