Main image of article Facebook Makes Changes to React, Adds VR
[caption id="attachment_136636" align="aligncenter" width="750"] Facebook HQ Facebook HQ[/caption] At F8, Facebook’s annual developer conference, the company announced it was adding a VR library to the React framework. It’s also changing React itself to focus on speed and reliability. Utilizing JavaScript, React VR “lets anyone with an understanding of JavaScript rapidly build and deploy VR experiences using standard web tools.” Facebook adds: “Those experiences can then be distributed across the web – React VR leverages APIs like WebGL and WebVR to connect immersive headsets with a scene in a web page.” Developers will be able to take 360-degree environments and overlay 2D text or imagery, and add spacial sound to VR. This also means those familiar with React and JavaScript will be able to get up and running with VR quickly. Facebook says React VR has to be able to perform at up to 90 frames per second, which may be why it re-tooled React itself. Speaking to TechCrunch, Facebook says React Fiber is already in production inside of Facebook. Backwards compatible, Fiber’s purpose is to be more responsive. React core team member Ben Alpert told the publication: “When we develop React, we’re always looking to see how we can help developers build high-quality apps quicker. We want to make it easier to make apps that perform very well and make them responsive.” Alpert added: “We wanted to start with a new foundation that could power everything we do going forward.” That’s also coming to Relay, the company’s framework for data-driven apps. Billed as a “re-introduction,” Relay Modern was “designed from the ground up to be easier to use, more extensible and, most of all, able to improve performance on mobile devices.” Originally designed for powerful devices like desktop machines, Relay Modern is being revamped for use in a mobile world. A “forward-looking GraphQL framework,” Facebook says it took everything it learned from Relay the first time around and polished it. Simplifying the API, improving performance, and adding features were all done on the back of static queries and ahead-of-time optimization. All told, React and Relay are now designed to be fast, which helps in an on-demand world. It’s also useful for VR, which needs to process heavy datasets in real time to avoid lag.