Skip to content

Commit

Permalink
use AsyncStorage on react-native. bump v0.7.2
Browse files Browse the repository at this point in the history
  • Loading branch information
endel committed Sep 30, 2017
1 parent c4b294a commit 8e5b808
Show file tree
Hide file tree
Showing 6 changed files with 4,235 additions and 4,171 deletions.
24 changes: 24 additions & 0 deletions README.md
Expand Up @@ -104,6 +104,30 @@ room.onLeave.add(function() {
- [Server documentation](https://github.com/gamestdio/colyseus/wiki)
- [Official examples](https://github.com/gamestdio/colyseus-examples)

## React Native compatibility

This client works with React Native. You need to install an aditional dependency
for compatibility.
```
npm install react-native-browser-polyfill
```

```
// App.js
require('react-native-browser-polyfill');
```

The only caveat inside React Native environment is that you can only join rooms
after the first connection open.

```
var client = new Colyseus.Client('ws://localhost:2657');
client.onOpen.add(() => {
let room = client.join("your_room");
})
```

## License

MIT

0 comments on commit 8e5b808

Please sign in to comment.