Making native code interact with React VR

You can really see the power of React VR if we then go ahead and make this object interact with the rest of the world. To do that, we will need to change the index.vr.js. We will also use a VrButton for the first time.

Note the spelling in VrButton. I was beating my head against the keyboard for a while on that one. I just naturally type "VR" instead of "Vr," but it does follow the React VR case standard. The clue is that in the console you will see VRButton is not defined, which normally means that you forgot it in the import statement. In this particular case, you'll see an oddity of React; you can type import { YoMomma } from 'react-vr'; and you won't get an error; try it. React VR is apparently ...

Get Getting Started with React VR now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.