HalmonLui / reactnative-socketio

Testing out Socket.io with React Native

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

reactnative-socketio

Working demo of React Native communication with Node.js via Socket.io. This was a trial of linking a RN app with Socket.io before adopting into another project.

How to run

Node.js Server:

Requires Node.js, Express.js, Socket.io, Ngrok

  1. cd server
  2. DEBUG=server:* npm start
  3. Run Ngrok for port 3000, copy the link and paste in mobileapp's App.js socketURL var

React Native App:

Requires Android Studio, React Native, Android SDK, Socket.io-client

  1. cd mobileapp
  2. npx react-native run-android

Screenshots

Released button

Demo app with messages sent

Pressed button

Demo app with button pressed

Node.js server logs

Node.js server logs

About

Testing out Socket.io with React Native

License:MIT License


Languages

Language:Java 47.2%Language:JavaScript 25.1%Language:Objective-C 17.2%Language:Starlark 6.5%Language:Ruby 2.6%Language:Pug 0.9%Language:CSS 0.4%