Hot reloading is built into React VR, enabled by a startup flag (
enableHotReload) when creating a VRInstance. For example:
You can also use
hotreload as a query parameter to enable hot reloading should the application not set a preference.
Hot reloading makes use of the React Native Packager to watch the local file system and notify the runtime regarding file changes. File changes trigger a reload of that module by the React VR runtime systems. For more information about using hot reloading and some nuances of the system, see Introducing Hot Reloading in the React Native Blog.
In the React Dev tools for Nuclide is the Element Inspector that allows developers to view and alter properties of components within a running application. To use the Inspector you must install Nuclide
To make use of the Inspector, the bundle must be enabled with
dev=true. This is the default setting for applications created by the react-vr CLI but you can confirm it by searching for the ReactVR.init function and looking for the
dev=true query parameter.
Now the application, Nuclide and the React Native Packager are configured you should browse to the location of your React VR project index.html with the query param
devtools for example:
Now selecting the
React Inspector tab should present a window similar to
Note: Because React VR makes extensive use of data types (such as Transforms) that are not in common use within React and React Native, certain properties are not displayed in their optimal form.
You can file an issue on GitHub if you see a typo or error on this page!