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.
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.