This talk has been presented at React Advanced 2021, check out the latest edition of this React Conference.
Video: Expo vs React Native: Streamlined Development
FAQ
React Native is a framework that allows developers to build cross-platform mobile applications using React and JavaScript. It enables the same codebase to render on both iOS and Android platforms by using native views instead of web views.
The core differences are that React Native uses proper native views instead of drawing views to Skia like in Chrome. This allows for platform optimizations such as smooth scrolling, gestures, and complex animations. React Native also supports the use of multiple threads and custom native clients for extra functionality.
Some challenges include the need to create a native runtime to get started, managing dependencies which are harder than in web development, distributing the app via App Store or Google Play Store which involves complex code signing, and frequent and complex upgrades requiring familiarity with iOS and Android native development.
Expo simplifies React Native development by providing tools such as a reusable pre-built runtime, fast iteration speed, and integrated cloud services. It allows developers to create and run apps without native builds, manage dependencies easily, publish apps with a single command, and add native code or customize the client with minimal complexity.
Expo CLI is a modern Node.js Command Line Interface that helps developers interface with the bundler, start a development server, and perform various development tasks. Developers can install Expo CLI globally and create new projects with commands like 'expo init' and run them on iOS, Android, or web platforms using NPM scripts.
Expo Go allows developers to instantly open their app on iOS and Android without needing to make native builds. It includes most of the APIs needed for complex native apps built ahead of time, reducing the complexity and time required to launch a 'Hello World' app, making it as easy as web development.
Expo uses a tool called Expo Application Services (EAS) for deploying apps. EAS automates native code signing, validation, and submission to the App Store or Google Play Store. Developers can submit their app with a single command, simplifying the traditionally difficult and error-prone process of deploying mobile apps.
Over-the-air updates in Expo allow developers to update JavaScript and assets in their app instantly. By running 'expo publish,' the JS bundle is pushed to a hosting service, which the app's runtime checks for updates. The next time the user opens the app, the updated version is downloaded in the background and presented.
Expo has two main workflows: the Managed Workflow and the Bare Workflow. The Managed Workflow allows developers to avoid working directly with native code and maximizes cross-platform configuration. The Bare Workflow provides full control over every aspect of the project, requiring manual updates for native configurations.
The Expo SDK is a set of npm packages versioned together to ensure compatibility. It includes core primitives and community packages that support iOS, Android, and web platforms. The SDK simplifies dependency management and provides a reliable versioning system to solve common issues encountered in React Native development.
Check out more articles and videos
We constantly think of articles and videos that might spark Git people interest / skill us up or help building a stellar career
Workshops on related topic
Tests rely on many conditions and are considered to be slow and flaky. On the other hand - end-to-end tests can give the greatest confidence that your app is working. And if done right - can become an amazing tool for boosting developer velocity.
Detox is a gray-box end-to-end testing framework for mobile apps. Developed by Wix to solve the problem of slowness and flakiness and used by React Native itself as its E2E testing tool.
Join me on this workshop to learn how to make your mobile end-to-end tests with Detox rock.
Prerequisites- iOS/Android: MacOS Catalina or newer- Android only: Linux- Install before the workshop
Appflow is the cloud mobile DevOps platform built by Ionic. Using a service like Appflow to build React Native apps not only provides access to powerful computing resources, it can simplify the deployment process by providing a centralized environment for managing and distributing your app to multiple platforms. This can save time and resources, enable collaboration, as well as improve the overall reliability and scalability of an app.
In this workshop, you’ll deploy a React Native application for delivery to Android and iOS test devices using Appflow. You’ll also learn the steps for publishing to Google Play and Apple App Stores. No previous experience with deploying native applications is required, and you’ll come away with a deeper understanding of the mobile deployment process and best practices for how to use a cloud mobile DevOps platform to ship quickly at scale.
In this three-hour workshop we’ll address these questions by discussing how to integrate Detox into your development workflow. You’ll walk away with the skills and information you need to make Detox testing a natural and productive part of day-to-day development.
Table of contents:
- Deciding what to test with Detox vs React Native Testing Library vs manual testing- Setting up a fake API layer for testing- Getting Detox running on CI on GitHub Actions for free- Deciding how much of your app to test with Detox: a sliding scale- Fitting Detox into you local development workflow
Prerequisites
- Familiarity with building applications with React Native- Basic experience with Detox- Machine setup: a working React Native CLI development environment including either Xcode or Android Studio
Contents: This workshop is aimed at beginner developers that have an existing web application, or are interested in mobile development. We will go over:- What is Capacitor- How does it compare to other cross-platform solutions- Using Capacitor to build a native application using your existing web code- Tidying up our application for distribution on mobile app stores with naming conventions, icons, splash screens and more
Comments