Acess to room to add a new Listener

Hi everyone.
On index.html, where the react app is mounted, i want to access to “room” to add a new listener.
i’m doing like: window.APP.conference._room.on(,()=>{console.log(‘test’)});

it works, but i think it’s not a good idea. How can achieve that?

And how i know that the conference was initialized?

Thank you very much.

something likes the following?