Please don’t use ids from React, Angular, Vue, etc, that’s not a good practice working with components and navigating between screens in any framework, check this WebComponent instead => https://github.com/proyecto26/ion-phaser
Sorry for the late response. I know what you mean, but this does not apply to this example.
Maybe you did not go through the code. I do not manipulate <div id="phaser"></div> from within a react app. Unlike you do in ion-phaser, I use a react instance inside a phaser scene, and use the react components as user UI for the phaser game.
So the main difference with ion-phaser and my example is, that my example is not a react app, its a phaser game written in typescript which uses react as a UI.