Open Source Tool Smooths Onramp to React Native
Addressing the complexity of chaining together all the moving parts required to get a React Native project built and running, the open source community has published a starter app to smooth the process.
The new tool -- a collaboration between Expo and React Native creator Facebook -- is kind of a blend between the existing Create React App (for the pure Web-based React technology, sometimes presented as ReactJS or React.js) and the Expo app used to run apps developed with the Expo platform.
Some of the reported advantages of CRNA are that developers don't have to use Android Studio or Apple's Xcode IDE for iOS development, nor use a Mac machine to develop iOS apps.
Running some command-line interface (CLI) instructions from a terminal window to install the tooling via npm will create a project and start the React Native packager, while also printing a QR code used by the Expo app (available from the iOS and Android app stores) to run the newly created CRNA app. Developers can also use CRNA to create standalone apps that don't run rely on the Expo app to run and can be deployed via app stores, though the process is much more involved.
Perry said the CRNA app can hook into standard React Native and Expo SDK APIs, but not any native code, as is possible with regular React Native development.
"Many React Native projects have Java or Objective-C/Swift dependencies that need to be compiled," Perry said. "The Expo app does include APIs for camera, video, contacts, and more, and bundles popular libraries like Airbnb's react-native-maps, or Facebook authentication. However if you need a native code dependency that Expo doesn't bundle then you'll probably need to have your own build configuration for it."
Doing so involves "ejecting" the app from the Exponent platform and continuing in the traditional way with Xcode or Android Studio.
Perry, using the moniker "dikaiosune," answered questions about CRNA in the comments section of his Hacker News post, where he assured finicky developers that all the tools used by CRNA are open source, so the project results in no proprietary technology or vendor lock-in.
He also answered a user asking if CRNA provided any benefits to developers already using the Expo Develop Environment (XDE) above and beyond what they could do by just starting a new XDE project.
"Probably not," Adams replied. "One of the biggest advantages of CRNA is that we built it from the ground up to not require integrating with Expo's accounts or services. If you've already opted-in to those services, then you're probably getting what CRNA offers plus a little extra."
Perry later amended his post to say: "That said there are definitely some areas of CRNA that have had more polish than Expo's current tools, and I'm going to be spending a lot of time in the coming months bringing them closer to parity."
David Ramel is editor in chief of Visual Studio Magazine and Application Development Trends Magazine.