Using Native Modules
Last updated
Using Native Modules?
Sometimes a React Native app needs to access a native platform API that is not available by default in JavaScript, for example the native APIs to access Apple or Google Pay. Maybe you want to reuse some existing Objective-C, Swift, Java or C++ libraries without having to reimplement it in JavaScript, or write some high performance, multi-threaded code for things like image processing.
The NativeModule system exposes instances of Java/Objective-C/C++ (native) classes to JavaScript (JS) as JS objects, thereby allowing you to execute arbitrary native code from within JS. While we don't expect this feature to be part of the usual development process, it is essential that it exists. If React Native doesn't export a native API that your JS app needs you should be able to export it yourself!
Free resources to learn Using Native Modules
- Official docsNative Modules Introduction
More in stage 15: Using Native Modules
Using Native Modules: common questions
Can I learn Using Native Modules in Hindi?
This lesson is written in English. Once you sign in, open it in the interactive course and ask the AI tutor to explain Using Native Modules in Hindi or Hinglish. The tutor answers from this lesson’s own text, so it stays on the syllabus, and it runs on your own Google, OpenAI or Anthropic key.
Is this Using Native Modules tutorial for beginners?
It is lesson 77 of 94 in the free React Native roadmap, in stage 15, Using Native Modules. If you are new to React Native, start from stage 1 and come back here in order; if you already know the earlier stages, this lesson stands on its own.