Expo: Building Universal Native Apps with React
As a developer, working on various platforms for building native apps can be a hassle. Typically, developers need to write Swift code for Apple or Kotlin for Android to build a mobile app. This can be quite cumbersome, especially for web developers who are more comfortable with JavaScript. However, Expo, an open-source toolset, aims to simplify this process by allowing developers to build universal native apps for iOS, Android, and the web using a single React codebase.
React Native and Expo
React Native addresses the issue of having to learn different programming languages for different platforms. It uses a JavaScript bridge that allows React components to represent native UI components, making it easier for web developers to transition to mobile app development without learning new languages.
With React Native, developers can write code that looks like HTML and CSS but actually builds truly native widgets, not just a web view embedded in a native app. These widgets can interact with native APIs such as the camera, keyboard, and vibrator, providing a seamless native app experience.
Expo’s Role
Expo takes the simplification of mobile app development a step further. Running a command to generate a project template takes care of all the annoying configurations, allowing developers to start writing code right away. With Expo, developers can use npm to instantly run the app on iOS, Android, and the web by simply running an npm command.
Moreover, Expo offers a hot reload feature which reflects changes made to the UI in real-time. This makes the development process more efficient and allows for quick iteration on the app’s design and functionality. Additionally, developers can test the app in a sandbox using tools like Expo Go.
File System-Based Routing
An interesting aspect of Expo is its use of file system-based routing, similar to frameworks like Next.js and Remix. This allows developers to create screens that are automatically deep-linkable on mobile and navigate between them using the Link component. In addition, Expo provides attributes like push and replace to control the navigation behavior on mobile platforms.
Expo also offers layouts that allow for sharing UI across multiple pages and representing more advanced routing patterns such as tabs and modals.
Access to Native APIs and Integrations
Beyond routing, Expo provides a plethora of libraries for working with native APIs. For example, developers can easily use the camera package by installing it with Expo and integrating the camera view component into the app’s UI. Similar integrations are available for maps, sensors, and various other use cases. Additionally, Expo offers integrations with backend cloud infrastructure providers like Firebase and Superbase.
One of the notable features of Expo is its “continuous native generation”, where native code is generated predictably from a set of inputs. This eliminates the need for developers to manually touch Java and Objective C code in Android and iOS directories, reducing the chances of breaking the app.
Automated Testing and Deployment
Expo integrates with Detox for automated testing on native devices and emulators, allowing developers to ensure the quality and reliability of their apps.
For deployment, Expo offers the ability to statically render pages for the web and automate builds in the cloud for mobile apps. This enables developers to submit their apps to the Google Play Store and Apple App Store without needing a Mac, making the process of reaching end-users easier and more accessible.
Conclusion
In conclusion, Expo simplifies the process of building universal native apps by providing a comprehensive set of tools and integrations for developers. With its focus on cross-platform development and seamless integration with native APIs, Expo empowers developers to create high-quality apps for iOS, Android, and the web using a single React codebase. As the landscape of app development continues to evolve, Expo remains a powerful and valuable tool for developers looking to streamline their development workflow and reach a broader audience.
Nice video! Would love to see expo vs flutter comparison
As a native Android developer, this is really cool technology, now please take down this video before any company sees it
I would love you to speak about Meteor 3.0
Recently had to start learning react native for work and expo is amazing
Was this a video for React Native or Expo ?
Is there something like expo for all of JavaScript? Not just react native. So also vue?
Awesome music on piano, guitar. Happy Friday. Could I know the music album/ source?
Flutter.
Would be cool to see a video on CapacitorJS too. As a vite-vue stack guy, nothing beats the capacitor-community packages at the moment. It's much easier to hack things together.
All I really want is a cross-compiler from Svelte web code -> Native UI + business logic. Not a series of custom widgets that look like web markup, actual HTML+Svelte syntax compiled to native. None of this React Native, Svelte Native, Expo garbage.
Can I use it without terrible React and with awesome Svelte? No, I thought so ๐ so I don't like it
That's an ad!
I would like you to cover Motoko please.
Native app? Or native UI with JavaScript underneath
the fact that you are locked in with expo and have to pay for building the app stops me from trying it. additionally how do you get out of expo if you want to, it seems nearly impossible from what I have read. you should own your code and not be bound to a platform.
good. but Flutter is best better thing in cross-platfrom development.
What's the difference between this and Flutter?
I'm starting to build an app using the expo/react native stack. What i don't understand so far is how easy/difficult it would be to actually export my app as an apk that could be shared or published to the google/ios app store.
no need for mac ๐ฅ๐ฅ
As someone who has worked with many cross platform technologies I would warn anyone to think seriously before using this. If you have to use a cross platform technology then Flutter is your go to. The โbenefitโ of being able to use a tech that with a language you already know is way overrated. Also the โbenefitโ of using โrealโ native components is not only overrated but will cause you massive headaches trying to get your product looking the same, and in some cases just looking terrible, resulting in a lot of dirty workarounds as you start to write platform specific code, defeating the purpose of a cross platform technology.
Love these! What about 100 seconds of Flyte – one of the hottest kubernetes based orchestrators right now!
Please stop spreading misinformation. Expo supports native modules just fine, stop confusing it with Expo Go
JavaScript flutter
Horse Tinder?!
Expo is cool but the only thing that I don't like is the loss of control over release builds. All release builds force you into their cloud service (its their business model)
Next video python kivy.
You Dont Even Need A Mac. This is a game changer. ๐
2024 Expo is insanely good
I wanna learn about using detox with expo
As an iOS dev I say: Nice! Another wave of โplease rewrite our shitty stuttering [insert name of cross-platform framework of the year] into a decent native app.
No hate, just stating the facts. I can smell it was made by some useless losers at Meta.
Great! Just added new technology in my CV.
Expo is fantastic. Have used it in several projects with great success and avoiding too much hassle.
Might wanna add the info that you can easy use bun since it's not running node on the phone but Hermes.
Iโd rather learn swift and kotlin just to not touch ugly amateurish react.
I used expo in one of my college projects to develop a mobile app. Very cool tool and live testing helped me so much. Thanks for bringing light to this.
"fixes"
yet another thing….
never going to use it…
if you want multiplatform tool use c, c++.
Paid to do this video.
please do scala 3 next ๐
it is same as flutter
So when you need a browser app, but want it to run natively… check.
Note, you will need a mac to sign your app
Do you still need MacOS to build Apple apps?
Now we can… Awesome ๐
Dammmmmmmmmmmm great one