Skip to content Skip to sidebar Skip to footer

Send A Message Between Client And Server Is Not Fine I Using Socket.io In React-native

I'm trying to use Socket.io with react native App but I have some issue between client side and server side, I think is the code right but it doesn't update the state when clicked

Solution 1:

I think the problem come from the address of your socket server. In App.js you wrote localhost but if it’s in mobile so emulator or device, then your address can’t be localhost. It could 10.0.2.2 for emulator Android or your pc address on the WiFi shared by your pc and your device.


Post a Comment for "Send A Message Between Client And Server Is Not Fine I Using Socket.io In React-native"