Initial React Native
1 | $ npx react-native init imapp && cd imapp |
Run on ios
1 | $ npx react-native-run-ios |
Install SocketCluster Client
1 | $ yarn add socketcluster-client |
Initial Socket
App.js
1 | import SocketClusterClient from 'socketcluster-client'; |
Server 可以收到 data
基本上已經可以確認接通了 SocketCluster Server 與 Client
之後就可以準備其他事情