All SkillsGet Started Free
Expo Module
Guide for creating and writing Expo native modules and views using the Expo Modules API (Swift, Kotlin, TypeScript). Covers module definition DSL, native views, shared objects, config plugins, lifecycle hooks, autolinking, and type system. Use when building or modifying native modules for Expo.
MCP get_skill({ skillId: "expo-module-f208a484" })Use this skill with your agent
Create a free account and connect via MCP
# Writing Expo Modules Complete reference for building native modules and views using the Expo Modules API. Covers Swift (iOS), Kotlin (Android), and TypeScript. ## When to Use - Creating a new Expo native module or native view - Adding native functionality (camera, sensors, system APIs) to an Expo app - Wrapping platform SDKs for React Native consumption - Building config plugins that modify native project files - Adding Android, Apple, or web support to an existing Expo module - Editing `expo-module.config.json`, config plugins, or lifecycle hooks ## References Consult these resources as needed: ``` references/ create-expo-module.md Scaffolding and add-platform-support workflow, defaults, and quirks native-module.md Module definition DSL: Name, Function, AsyncFunction, Property, Constant, Events, type system, shared objects native-view.md Native view components: View, Prop, EventDispatcher, view lifecycle, ref-based functions lifecycle.md Lifecycle hooks: module, iOS app/AppDelegate, Android activity/application listeners config-plugin.md Config plugins: modifying Info.plist, AndroidManifest.xml, reading values in native code module-config.md expo-module.config.json fields, file placement, and autolinking behavior ``` ## Quick Start Prefer `create-expo-module` over manually creating native module files and directories. In practice, the best path is usually to create the scaffold first and then build on top of it. The scaffold sets up the expected layout, `expo-module.config.json`, podspec or Gradle files, TypeScript bindings, and the standalone example app flow. If an existing Expo module only needs another platform, use `create-expo-module add-platform-support` instead of manually copying native directories. See [references/create-expo-module.md](references/create-expo-module.md) before scaffolding or extending a module. It covers: - local vs standalone modules - `--platform`, `--features`, `--barrel`, `--package-manager`, and non-interactive mode - `expo.autolinking.nativeModulesDir` - `add-platform-support` behavior and quirks ## Recommended Workflow 1. Choose the scaffold type first: - **Local module** for one app - **Standalone module** for reuse, monorepos, or publishing 2. Determine native `expo-module` features that you will need. - Based on the user's instructions determine which feature scaffolding will be useful. - Available features: `Constant`, `Function`, `AsyncFunction`, `Event`, `View`, `ViewEvent`, `SharedObject` 3. Scaffold deliberately: - pass an explicit slug or path
#react-native#expo#react#native#mobile