A React Native app may occasionally need to access a native platform API that is not by default available in JavaScript, such as the native APIs for using Apple or Google Pay. Perhaps you want to write some high-performance, multi-threaded code for things like image processing or reuse some existing Objective-C, Swift, Java, or C++ libraries without having to reimplement them in JavaScript.

The NativeModule system lets JavaScript (JS) run any native code from within JS by exposing instances of Java/Objective-C/C++ (native) classes as JS objects. Although we don’t anticipate this feature to be included in the standard development process, its existence is crucial.

Leave a Reply

Login with