O'Reilly logo

React Native Cookbook by Crysfel Villa, Stan Bershadskiy

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Exposing custom iOS modules

As you begin writing exciting and engaging React Native applications, you will get to a point where you need to execute some code on the native layer. This could be anything from executing some data processing that is better suited to the native layer instead of JavaScript for performance, accessing some native functionality that is not exposed, such as file I/O, or leveraging existing native code from other applications or libraries in your React Native app.

This recipe will walk you through the process of executing some native Objective-C or Swift code and communicating with the JavaScript layer. We will build a native HelloManager module that will greet our user with a message. We will also show how to execute native ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required