I am using quick blox for text chat app, but for event handler using
const receivedNewMessage = (event) =>{
const { type, payload } = event;
// handle new message
// type - event name (string)
// payload - message received (object)
console.log("payload ==>", payload);
console.log("type ==>", type);
}
emitter.addListener(
QB.chat.EVENT_TYPE.RECEIVED_NEW_MESSAGE,
receivedNewMessage
); ``` it will always give me the warning, new NativeEventEmitter()` was called with a non-null argument without the required `removeListeners` method. as a result not getting expected result ...what should be the solution please help ...i am new to react native.