TurboModules
Using TurboModules to connect JavaScript to C++
It is recommended to read the React Native TurboModules documentation before diving into this section to understand the general principle of operation.
TurboModules are the way to connect JavaScript to C++ in a rnue project.
Below is a bird's eye view of the process of creating a TurboModule:
Create a TypeScript spec
The spec defines the methods, events and types for the module. Those will be used by the JavaScript and C++ sides when calling the implemented module.
Generate the boilerplate
This step is automatic and done by running @rnue/codegen.
Link or copy the generated bridge to the Unreal project
This step is also automatic and done by running @rnue/cli.
Implement the native service
Now you can implement the functionality intended by the spec you supplied to the code generator.
Use the native service
You can now use the native service in your JavaScript code by importing the spec.
If you are ready to dive in, continue to the Building a TurboModule guide.