# How do I play online with react js + phaser 3 + socket.io?

**URL:** <https://phaser.discourse.group/t/how-do-i-play-online-with-react-js-phaser-3-socket-io/2525>\
**Category:** Phaser 3\
**Created:** [May 22, 2019, 5:59am UTC](https://phaser.discourse.group/t/how-do-i-play-online-with-react-js-phaser-3-socket-io/2525 "2019-05-22T05:59:00Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![yannick](https://yyz2.discourse-cdn.com/free1/user_avatar/phaser.discourse.group/yannick/32/732_2.png) [@yannick](https://phaser.discourse.group/u/yannick)\
**Post date:** [May 24, 2019, 7:21pm UTC](https://phaser.discourse.group/t/how-do-i-play-online-with-react-js-phaser-3-socket-io/2525/5 "2019-05-24T19:21:43Z")

</div>

Since you ask me directly, I assume you are refering to my [phaser react example](https://phaser.discourse.group/t/use-react-inside-of-phaser-3-with-typescript-example/1360).

This is not how I would recommend getting and setting the react state. I would pass the phaser scene to the react component and access the state via event emitter.

---

_[View the full topic](https://phaser.discourse.group/t/how-do-i-play-online-with-react-js-phaser-3-socket-io/2525)._
