Below is my react native component and node server.js code that I am trying to connect to my node websocket backend.
My react code is running on the same computer as th
Thanks, Peter. In my opinion, the article you have found isn't helpful because you are trying to connect to the host that serves the page.
According to the example on socket.io page, try to make sure that this line works:
const io = require('socket.io-client/socket.io');
and connect without link: let socket = io();
It worked for me, but only in the browser on the same computer. I think when you will test on the device you have to specify your IP instead of localhost.
Good luck :)