In which lifecycle method should i pass the stream to the RTCView?

Greetings,
I have successfully created the stream, following the documentation, but now I don’t know when and where to pass the stream to the RTCView.

Should I store the stream in the state to trigger a re-render and, in this new render, create the RCTView with the stream?

Should I use a react ref to the RTCView and then, in another lifecycle method, pass the stream?

Does anyone have an example of the best way to get the RTCView to show my camera feed?

Source code of my component: https://bitbucket.org/Geromin/webrct-how-to-get-the-camera-feed/src/master/App.js

The repo, as a whole https://bitbucket.org/Geromin/webrct-how-to-get-the-camera-feed/src/master/App.js

You can do it wherever you see fit really. After calling getUserMedia the user will either see the permission prompt or you’ll get a rejection. So, you can render a component while the promise resolves, and once you have the stream create the view to render it.