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
I believe it should be
const io = require('socket.io-client');
Which does work for me.
I remember running into these sorts of issues when using react native. A lot of socket.io tutorials (including the one on their page) assume you're using an older style of importing JS via script tags in an HTML doc. It looks like socket.io changed the namespace as I do remember it being socket.io-client/socket.io
some time ago if memory serves...