react-native-otp-verify icon indicating copy to clipboard operation
react-native-otp-verify copied to clipboard

new NativeEventEmitter() was called with a non-null argument without the required addListener method

Open doublex opened this issue 3 years ago • 2 comments

Running the code on ios, this yellowbox-warning pops up:

new NativeEventEmitter() was called with a non-null argument without the required addListener method

Maybe: https://stackoverflow.com/questions/69538962/new-nativeeventemitter-was-called-with-a-non-null-argument-without-the-requir

doublex avatar Dec 19 '22 17:12 doublex

This is mainly because of

const eventEmitter = new NativeEventEmitter(RNOtpVerify);
https://github.com/faizalshap/react-native-otp-verify/blob/master/src/index.tsx in line 21. May be this function should be called conditionally based on platform if it is ios/android

dinchen-tally avatar Dec 26 '22 13:12 dinchen-tally

This happens since RN 0.71 and still the latest version throws this error. Is there any progress on this one for the next release?

mertafor avatar Mar 28 '23 07:03 mertafor