The React 0.68+ Turbo Module starter is a code generator for Objective-C and Java/Kotlin with a shared C++ library. It is designed for use with React Native version 0.68 and above. The starter includes features such as TurboModule, codegen with TypeScript, usage of arrays/dictionaries/promises, and native functionality. Note that this module does not offer backward compatibility and requires the new architecture enabled.
To install the React 0.68+ Turbo Module starter, follow the steps below:
RCT_NEW_ARCH_ENABLED=1 pod install in the
xed ios in the terminal.
Pods -> Development Pods -> react-native-turbo-starter -> ios -> TurboStarter.mm in the left side-bar of XCode.
@implementation, XCode will offer to complete the missing protocol for you. Alternatively, you can manually implement the new function in
./gradlew generateCodegenArtifactsFromSchema in the
src/NativeTurboStarter.ts and add your function definition inside the Spec.
src/index.ts and wrapping it.
The React 0.68+ Turbo Module starter is a powerful tool for developing React Native applications with advanced features. It allows for efficient code generation, compatibility with Objective-C and Java/Kotlin without the bridge, and usage of C++ for enhanced functionality. The installation process involves setting up the example project, adding new functionality in both native and C++ contexts, and running the project to test the code.