I am new to react-native and working on a project in react-native. I integrated socket using following code.
this.socket = socketIO.connect(global.socketUrl, {
jsonp: false,
reconnection: true,
reconnectionDelay: 1000,
reconnectionDelayMax: 5000,
reconnectionAttempts: Infinity
});
Further I created instance of SocketManager class in my component using below code.
Obj= new SocketManger()
This code is working fine in debug build, but we are getting the following error
TypeError: Cannot read property 'initialize' of undefined\n at new Socket
TIA
We also followed answer mention at Here but not getting any accurate result. with this code we are getting below error.