Expo Modules
Adding native code to our React Native apps
Agenda
- History and background
- EAS build and dev client
- Expo modules demo
React Native as an interface
#javascript
alert("hello world")
#swift
Alert(
title: Text("Current Location Not Available"),
message: Text("Your current location can’t be " +
"determined at this time.")
)
#java
val alert = dialogBuilder.create()
alert.setTitle("AlertDialogExample")
alert.show()
Expo Go
React Native + Expo packages
- Expo SDK picks up where React Native core libaries end
- Audio, barcode scanning, camera, calendar, etc. etc.
- What happens if you need access to additional native functionality?
Development builds
- Like your own version of the Expo Go client
- Can add native code!
- Installing native modulesÂ
- What happens if there's no good React Native package yet?
React Native modules
- React Native Bridge
- Expo Modules
Demo!
Demo Review
- npx create-expo-modules
- Development workflow
- building in the example app
- Xcode for iOS, Android Studio for Kotlin
- Needs to be a separate package
- Deploy using Github actions
- Adding dependencies
Resources
https://docs.expo.dev/workflow/expo-go/
https://docs.expo.dev/workflow/using-libraries/
https://docs.expo.dev/build/introduction/
https://docs.expo.dev/development/introduction/
https://docs.expo.dev/modules/overview/
React Native Modules
https://reactnative.dev/docs/native-modules-intro
https://medium.com/@dev_one/react-native-native-modules-ee5a8f390a7
Expo Discord
Example repo
https://github.com/alxhghs/example-expo-module
Expo Modules
By Alex Hughes
Expo Modules
- 51