render(){ const { wifi } = this.state; /*const client = TcpSocket.createConnection({ port: 80, host: '192.168.4.100', tls: false, interface: 'wifi', //localAddress: '192.168.4.101', }, () => { client.write('APPSETTING CONNECTED'); });*/
I put this code in render, so it results to multi connection by same IP.How can i initialize this server as client just one time in react native?