skillfed

Build Nitro Modules

This skill covers the complete workflow for creating React Native Nitro Modules: scaffolding monorepos with Nitrogen, authoring TypeScript HybridObject specs, generating native boilerplate, implementing platform code in C++, Swift, and Kotlin, and preparing modules for publication. Learn how the codegen pipeline transforms `.nitro.ts` specs into native bindings, manage HybridObject state and lifecycle, design factory methods for native resources, and integrate example apps and testing. Pair with api-design for general library shape and with language-specific skills (swift, kotlin, cpp) for platform implementation details.

Build Nitro Modules teaches end-to-end development of React Native Nitro Modules using Nitrogen codegen, TypeScript specs, and native implementations.

AI-generated summary based on this skill's SKILL.md

148 7 unlicensed — metadata only updated by margelo

Install

margelo/react-native-skills/build-nitro-modules

CLI (skillfed)coming soon
git clone https://github.com/margelo/react-native-skills
cp -r react-native-skills ~/.claude/skills/build-nitro-modules

generated, unverified - the skill's exact subdirectory could not be determined; check the repository on GitHub

Frequently asked questions

AI-generated answers based on this skill's SKILL.md and metadata

How to build Nitro modules for React Native?

Build Nitro Modules covers the complete workflow for creating React Native Nitro Modules. Start by scaffolding a monorepo with Nitrogen, then author TypeScript HybridObject specs in `.nitro.ts` files. The codegen pipeline automatically transforms these specs into native bindings. Implement platform code in C++, Swift, and Kotlin, manage HybridObject state and lifecycle, and design factory methods for native resources. Finally, integrate example apps, add testing, and prepare your module for publication.

What is the Nitro module development guide workflow?

Build Nitro Modules teaches the step-by-step development workflow: begin with monorepo scaffolding using Nitrogen, write TypeScript HybridObject specifications, run the codegen pipeline to generate native boilerplate automatically, implement platform-specific code across C++, Swift, and Kotlin, handle HybridObject state management and lifecycle, create factory methods for native resources, integrate example applications, set up testing infrastructure, and prepare your module for publication to ensure quality and usability.

How do I get started with Nitro modules?

Build Nitro Modules helps you get started by first scaffolding your monorepo with Nitrogen. You'll author TypeScript HybridObject specs that define your module's interface. The codegen pipeline then generates native boilerplate code automatically. Next, implement the actual platform code in C++, Swift, and Kotlin. Learn to manage HybridObject state and lifecycle, design factory methods for native resources, integrate example apps for testing, and follow best practices for module architecture and performance optimization.

What are Nitro modules and how to build them?

Build Nitro Modules explains that Nitro modules are React Native native modules built using a modern codegen-first approach. They're defined through TypeScript HybridObject specs that automatically generate native bindings. The workflow involves scaffolding with Nitrogen, writing `.nitro.ts` specifications, running codegen to produce boilerplate, implementing platform code in C++, Swift, and Kotlin, managing HybridObject lifecycle, designing factory methods, and integrating testing and example apps before publication.

What best practices apply to Nitro module development?

Build Nitro Modules covers best practices including proper HybridObject state management and lifecycle handling, designing efficient factory methods for native resources, structuring monorepos effectively with Nitrogen, writing clear TypeScript specs for reliable codegen, implementing platform code consistently across C++, Swift, and Kotlin, integrating comprehensive testing and example applications, and optimizing module performance. These patterns ensure maintainable, high-quality native modules.

What tools and setup does Nitro module development require?

Build Nitro Modules covers the essential tools and setup: Nitrogen for monorepo scaffolding, TypeScript for writing HybridObject specs, the Nitro codegen pipeline for automatic native binding generation, platform-specific compilers (C++, Swift, Kotlin), and testing infrastructure. The skill teaches how to configure your development environment, set up example apps for validation, organize your project structure, and prepare modules for publication using standard distribution channels.

Related skills

Tags

native-module-development react-native-tooling performance-optimization cross-platform-integration developer-workflow