Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update native-modules-android.md #2791

Merged
merged 6 commits into from
Oct 5, 2021
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions docs/native-modules-android.md
Original file line number Diff line number Diff line change
Expand Up @@ -516,6 +516,15 @@ private void sendEvent(ReactContext reactContext,
.getJSModule(DeviceEventManagerModule.RCTDeviceEventEmitter.class)
.emit(eventName, params);
}
@ReactMethod
public void addListener(String eventName) {
// Keep: Required for RN built in Event Emitter Calls.
simonbrunou marked this conversation as resolved.
Show resolved Hide resolved
}

@ReactMethod
public void removeListeners(Integer count) {
// Keep: Required for RN built in Event Emitter Calls.
}
...
WritableMap params = Arguments.createMap();
params.putString("eventProperty", "someValue");
Expand Down
9 changes: 9 additions & 0 deletions website/versioned_docs/version-0.65/native-modules-android.md
Original file line number Diff line number Diff line change
Expand Up @@ -516,6 +516,15 @@ private void sendEvent(ReactContext reactContext,
.getJSModule(DeviceEventManagerModule.RCTDeviceEventEmitter.class)
.emit(eventName, params);
}
@ReactMethod
public void addListener(String eventName) {
// Keep: Required for RN built in Event Emitter Calls.
}

@ReactMethod
public void removeListeners(Integer count) {
// Keep: Required for RN built in Event Emitter Calls.
}
...
WritableMap params = Arguments.createMap();
params.putString("eventProperty", "someValue");
Expand Down
9 changes: 9 additions & 0 deletions website/versioned_docs/version-0.66/native-modules-android.md
Original file line number Diff line number Diff line change
Expand Up @@ -516,6 +516,15 @@ private void sendEvent(ReactContext reactContext,
.getJSModule(DeviceEventManagerModule.RCTDeviceEventEmitter.class)
.emit(eventName, params);
}
@ReactMethod
public void addListener(String eventName) {
// Keep: Required for RN built in Event Emitter Calls.
}

@ReactMethod
public void removeListeners(Integer count) {
// Keep: Required for RN built in Event Emitter Calls.
}
...
WritableMap params = Arguments.createMap();
params.putString("eventProperty", "someValue");
Expand Down