I want to share with you a WebComponent I created to be able to integrate Phaser Framework with Angular, React, Vue, etc => https://codepen.io/jdnichollsc/full/oRrwKM
- npm package: https://www.npmjs.com/package/@ion-phaser/core
The idea with this is to avoid accessing to the DOM directly by using
<div id="game" /> or something like that because it’s an anti-pattern working with other frameworks, so you can respect the lifecycle of any library/framework using a component instead.
- Angular: https://github.com/proyecto26/ion-phaser/tree/master/demo-angular
- React: https://github.com/proyecto26/ion-phaser/tree/master/demo-react
- VueJS: https://github.com/proyecto26/ion-phaser/tree/master/demo-vue
Happy coding, and if you have any issue please let me know from the repo => https://github.com/proyecto26/ion-phaser