How to transfer data packets using Expo inbuilt packages (Expo go)

How to transfer data packets using Expo inbuilt packages (Expo go).
I wished to use the package react-native-tcp-socket but its not available on expo go. ejected, then build times are very slow due to my pc being low end. Hence I wish any other option for data transfer like a single alphabet, between nodejs server (pc) and expo client (phone) or vice versa, and expo should be able to send data.

Hi @nishweb

You do not need to “eject”. You can just create a development build using eas build --profile development and use that instead of Expo Go. As long as you are not changing your dependencies often you should not have to create a new build often. You do not need to run Android Studio or Xcode on your machine.

Otherwise maybe you can try something like WebSockets:

I can not run this in Snack though. I need it to be able to run in snack

You should have mentioned that in your question.

You could use fetch() (or e.g. axios), or WebSockets.

but fetch and axios is for sending and recieving data from an API or something similar .

My question is that can I use axios or fetch as a chat service where i can just send simple messages and recieve simple messages easily?

Next time it would help if you specify this sort of thing up front. :slight_smile:

Given your requirements it sounds like WebSockets will be best.

WebSockets are not specific to Expo or React Native, so you can search for articles or videos about how to implement a chat service using WebSockets if you can’t find something specific to React Native or Expo.

e.g.: "react" "chat" "websocket" - Google Search turns up several posts and videos that look like they might be helpful. Even if they are implemented using React and React DOM instead of React Native, the approach should still be the same.