Web apps and mobile apps don’t just look different, they have to be coded differently, too. However, a new open source framework from Facebook could make those two sets of code a little more similar to one another.
“What we really want is the user experience of the native mobile platforms, combined with the developer experience we have when building with React on the Web,” wrote Facebook software developer Tom Occhino. “With a bit of work, we can make it so the exact same React that’s on GitHub can power truly native mobile applications.”
Whatever simplification React Native might bring to mobile development, Occhino doesn’t want developers to get the wrong idea—they’ll still have to write two sets of code. One will be in React.js for their website; another will be in React Native for mobile applications.
The goal isn’t to change that, Occhino said at the React.js 2015 conference this February—just to make it easier for developers to learn one framework and apply their knowledge everywhere.
“We’re not chasing the write-once, run-anywhere pipe dream,” Occhino said at the conference. “Instead, what we want to do is chase the learn-once, write-anywhere paradigm.”
React was designed for Facebook’s express purposes, and entered a crowded web full of frameworks with similar sounding names, like Angular.js, Backbone.js, and Node.js. But the framework has carved out a niche for itself. Major companies like Yahoo, Mozilla, Reddit, and Airbnb have said they use React.
React Native’s iOS code is available on GitHub today with Android support “coming soon,” according to Facebook.
Photo of Tom Occhino courtesy of Facebook