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

Expo Modules

By Alex Hughes

Expo Modules

  • 51