Native capabilitiesAdvanced6h

Native modules.

Bridging to native code when JS is not enough.

What are native modules?

Native modules let your JavaScript call platform code written in Swift/Objective-C or Kotlin/Java. When a capability is not exposed by React Native or an existing library — a niche sensor, an SDK, custom native UI — a native module is the bridge to reach it.

Why it matters

React Native covers most needs through JS and community libraries, but eventually a real app hits something only native code can do. Knowing that native modules exist, when they are needed, and how the bridge works keeps you from being blocked — or from assuming you must rewrite the whole app natively.

What to learn

  • The JS-to-native bridge, conceptually
  • The new architecture: Turbo Modules and JSI
  • Finding an existing library before writing your own
  • Expo modules versus bare native modules
  • Passing data across the bridge
  • Platform-specific native implementations
  • The cost and maintenance of custom native code

Common pitfall

Writing a custom native module before checking whether a maintained library already solves it. Native code is far more work to write, test, and maintain across both platforms and RN upgrades. Search the ecosystem and Expo SDK first; custom native modules are a last resort, not a first reach.

Resources

Primary (free):

Practice

Find a capability React Native does not expose directly, then locate a community or Expo library that provides it and integrate that instead of writing native code. Read one native module's source to see how the bridge is wired. Done when you can explain when a custom module is truly necessary.

Outcomes

  • Explain the JS-to-native bridge and the new architecture.
  • Search for an existing library before writing native code.
  • Integrate a native capability via a library.
  • Judge when a custom native module is justified.
Back to Mobile roadmap