I was getting the warning:
new NativeEventEmitter() was called with a non-null argument without the required
removeListeners method.
I was using React Native Sound and to fix the warning I add the below lines of code to this file in the react-native-sound module: react-native-sound/android/src/main/java/com/zmxv/RNSound/RNSoundModule.java
// Explicitly implement addListener
@ReactMethod
public void addListener(String eventName) {
// Required for RN built-in Event Emitter Calls.
}
// Explicitly implement removeListeners
@ReactMethod
public void removeListeners(Integer count) {
// Required for RN built-in Event Emitter Calls.
}
Leave a Reply