This example shows how to connect and interact with socket-io backends.
- Run
yarnornpm install - Open
App.jsand change thesocketEndpointat the top of the file to point to your endpoint. - Open
appwithyarn startornpm run startto try it out.
cdinto thebackenddirectory and runyarnornpm install, then runyarn startornpm run start- Install ngrok and run
ngrok http 3000and copy the https url that looks something like thishttps://f7333e87.ngrok.io.
React Native provides a socket-io compatible WebSocket implementation, some people get tripped up on the https requirement so this example helps to clarify how you can get it running.
Frontend
npx expo startBackend
yarn start