mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Turbo Module EventEmitters as functions (#44886)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/44886 ## Changelog: [General] [Added] - Turbo Module EventEmitters as functions Reviewed By: javache Differential Revision: D58429202 fbshipit-source-id: c56793d216f5ecf981e62d3b004f715110903945
This commit is contained in:
committed by
Facebook GitHub Bot
parent
6a3a305628
commit
42f136d00d
@@ -266,22 +266,20 @@ class NativeCxxModuleExampleExample extends React.Component<{||}, State> {
|
||||
}
|
||||
if (NativeCxxModuleExample) {
|
||||
this.eventSubscriptions.push(
|
||||
NativeCxxModuleExample.onPress.addListener(value =>
|
||||
console.log('onPress: ()'),
|
||||
),
|
||||
NativeCxxModuleExample.onPress(value => console.log('onPress: ()')),
|
||||
);
|
||||
this.eventSubscriptions.push(
|
||||
NativeCxxModuleExample.onClick.addListener(value =>
|
||||
NativeCxxModuleExample.onClick(value =>
|
||||
console.log(`onClick: (${value})`),
|
||||
),
|
||||
);
|
||||
this.eventSubscriptions.push(
|
||||
NativeCxxModuleExample.onChange.addListener(value =>
|
||||
console.log(`onChange: (${JSON.stringify(value)})`),
|
||||
NativeCxxModuleExample.onChange(value =>
|
||||
console.log(`onChange: ${JSON.stringify(value)})`),
|
||||
),
|
||||
);
|
||||
this.eventSubscriptions.push(
|
||||
NativeCxxModuleExample.onSubmit.addListener(value =>
|
||||
NativeCxxModuleExample.onSubmit(value =>
|
||||
console.log(`onSubmit: (${JSON.stringify(value)})`),
|
||||
),
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user