Native Module

Also called Native modules

Updated

What is Native Module in React Native?

A native module is platform code — Swift, Kotlin, Objective-C, Java or C++ — exposed to JavaScript, letting an app reach APIs React Native does not wrap itself.

JSDevicesble-plxBluetooth
Native modulePlatform APIMissing or refusedA native module is platform code, in Swift, Kotlin, Objective-C, Java or C++, exposed to JavaScript. It is how an app reaches what React Native does not wrap: Bluetooth, biometrics, a payment SDK. Installing one adds native code, so it needs a native rebuild, where autolinking wires it in with no manual Xcode or Gradle steps, and it can never arrive in an over-the-air update. Under the New Architecture, the modern form is a TurboModule; in Expo projects, config plugins handle any permissions it needs.

A native module is a piece of platform code exposed to JavaScript. React Native wraps a useful but finite set of APIs; anything beyond it — Bluetooth, biometrics, a payment SDK, an on-device ML model — reaches your app through a native module.

Most developers consume rather than write them. Installing react-native-ble-plx or expo-camera adds native module code to the project, which is why those installs need a native rebuild and cannot be delivered by an over-the-air update.

Under the New Architecture the modern form is a TurboModule, typed by Codegen and loaded on demand.

Two things newcomers should recognise:

  • "Autolinking" means the native build discovers installed modules automatically — no manual Xcode or Gradle wiring in almost all cases.
  • A module needing a config change (permissions, entitlements) uses a config plugin in Expo projects rather than hand-edited native files.

See native modules.