Create React Native Library

作者 callstackincubator61e6e7dfdf3aMIT1.6K 個星標收錄於 2026年10月8日更新於 2026年10月8日儲存庫今天更新

Scaffolds React Native libraries with create-react-native-library for standalone libraries or local native modules and views. Use when creating or working on React Native libraries or adding native functionality in an existing app.

AI 產生的概覽

用於建立 React Native 函式庫,可建立獨立函式庫,也可在現有應用程式中加入本機原生模組與檢視。

功能
引導代理使用 create-react-native-library 命令列工具建立 React Native 函式庫,涵蓋純 JS 函式庫、原生模組與原生 UI 元件。它將工作分為兩條流程:建立可發佈的新函式庫,以及透過自動連結在現有應用程式中加入本機函式庫。它提供參考文件與帶有類型、語言、範例應用程式等選項的命令列呼叫範例。
適用情境
適用於建立或處理 React Native 函式庫、在現有應用程式中加入原生模組或檢視,或封裝原生 SDK 供 React Native 使用。它用於在實作之前選擇合適的建立流程。
執行需求
需要 Node.js 與 npx 來執行 create-react-native-library 命令列工具,並需要網路存取以取得該套件。它不附帶指令碼,僅為說明與參考文件。

Create React Native Library

Overview

Use this skill to scaffold a standalone React Native library or a local library inside an existing app, then continue with the correct implementation docs.

Examples:

  • JS-only library that may use other React Native libraries
  • Native modules that expose native functionality to JavaScript
  • Native UI components that render native views in React Native

Choose one flow first:

  • Use scaffold-library.md [blocked] when creating a new library that may be published to npm
  • Use local-library.md [blocked] when exposing native functionality in a React Native app

When to Apply

Use this skill when:

  • Creating or working on a React Native library with create-react-native-library
  • Creating a native module or view in an existing app
  • Wrapping native SDKs and exposing them to React Native

Quick Reference

bash
# Inspect current options before scaffoldingnpx create-react-native-library@latest --help
# Scaffold a library with turbo modules and the Expo example appnpx create-react-native-library@latest awesome-library \  --no-interactive \  --yes \  --description "A brief description of the library" \  --type turbo-module \  --languages kotlin-objc \  --example expo
# Scaffold a local Turbo Module inside an existing appcd MyAppnpx create-react-native-library@latest awesome-library \  --local \  --no-interactive \  --yes \  --description "A brief description of the library" \  --type turbo-module \  --languages kotlin-objc

References

FileDescription
scaffold-library.md [blocked]Scaffold a new library and default to the Expo example
local-library.md [blocked]Add a local library to an existing app with autolinking

Problem -> Skill Mapping

ProblemStart With
Need a new library scaffoldscaffold-library [blocked]
Need to add a local native library to an applocal-library [blocked]

來源與署名

來源:callstackincubator/agent-skills位於skills/create-react-native-library提交61e6e7d

授權條款: MIT

內容歸原作者所有。SourceWeft 從公開儲存庫中收錄這些內容。

檢舉或申請下架