Make IntArray events work on Bridgeless for RN-Tester (#41047)

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

Array events are currently broken in the sample for RN Tester. This is because the event name is not registered correctly.

I'm updating the event registration to be correct.

Changelog:
[Internal] [Changed] - Make IntArray events work on Bridgeless for RN-Tester

Reviewed By: cipolleschi

Differential Revision: D50266485

fbshipit-source-id: 13bbce91a41281383d4857048e573b6d9cc5387b
This commit is contained in:
Nicola Corti
2023-10-18 03:24:08 -07:00
committed by Facebook GitHub Bot
parent c9d0a006fd
commit 805f74f2a8
2 changed files with 2 additions and 2 deletions
@@ -110,7 +110,7 @@ class MyNativeView(context: ThemedReactContext) : View(context) {
viewId: Int,
private val payload: WritableMap
) : Event<OnIntArrayChangedEvent>(surfaceId, viewId) {
override fun getEventName() = "onIntArrayChanged"
override fun getEventName() = "topIntArrayChanged"
override fun getEventData() = payload
}
@@ -60,7 +60,7 @@ internal class MyNativeViewManager :
override fun getExportedCustomBubblingEventTypeConstants(): Map<String, Any> =
MapBuilder.builder<String, Any>()
.put(
"onIntArrayChanged",
"topIntArrayChanged",
MapBuilder.of<String, Any>(
"phasedRegistrationNames",
MapBuilder.of(