Overview:
The React Native Module Template is a starter template for the React Native library written in TypeScript. It includes an example project and the option to include native code written in Swift and Kotlin. The template aims to support the latest React Native versions and follow best practices.
Features:
- TypeScript set up and ready to use
- Option to include native code written in Swift and Kotlin
- Example project linked to the library for immediate feedback and testing
- Ability to modify code directly from Xcode or Android Studio
Installation:
- Clone the repository
- Rename the “react-native-module-template” folder to your desired library name
- Navigate to the renamed folder
- If you want to remove native code, run the following command:
yarn remove-native-code
- Follow the prompts to provide information such as library name, author name, and author email
- Make sure to use proper naming conventions for the library name and short name
- If needed, modify the library homepage and git URL in the respective files
- Remove the rename script
- Run
yarnto install dependencies in both the root and example folders
Summary:
The React Native Module Template is a convenient starting point for building React Native libraries in TypeScript. It provides TypeScript support, the option to include native code, and an example project for immediate testing and feedback. By following the installation guide and making necessary configuration changes, developers can quickly set up their project and start building their React Native libraries.