The Expo Modules API

Every expo-* package in this chapter (expo-sqlite 6,418 , expo-secure-store, expo-image 6,418 ) is built with the Expo 6,418 Modules API. Instead of a TypeScript spec plus Codegen, you describe the module in Kotlin and Swift with a small declarative DSL: Name, Constant, Function (synchronous), AsyncFunction, Events, View for native components, and SharedObject for native objects that JavaScript holds references to. Arguments and return values convert automatically.

It runs on the same foundation. Expo's docs describe both APIs as built on JSI, with "similar" performance, each able to make hundreds of thousands of native calls per second. On Android, Expo SDK 56 added a Kotlin compiler plugin that generates each module's bindings at build time instead of discovering them by reflection at startup; Expo's own benchmarks reported module initialization about 70% faster and time to first render cut by about 30%. The practical differences lie elsewhere: an Expo Module lives in its own folder with its own Gradle 19,597 file, is found by autolinking (no edits to MainApplication.kt), and survives expo prebuild untouched, which matters for Prebuild and CNG.