Skip to main content

brownie

Provides guidance for shared state in React Native brownfield apps with @callstack/brownie. Define stores in TypeScript, run brownfield codegen, use the generated APIs in React Native and native hosts, and package native artifacts for integration.

Informações da origem

Repositório
callstack/react-native-brownfield
Última atividade na origem
12 de maio de 2026 às 09:47
Idioma detectado do SKILL.md
inglês
Estrelas
553
Forks
58

Opções de instalação

Por padrão, está selecionado o prompt que primeiro revisa a origem. Você pode mudar para um comando direto ou baixar uma cópia local.

Revise os arquivos de origem

Leia o SKILL.md e os arquivos complementares exibidos pelo SkillsMP antes de decidir se vai instalar.

Explorador de arquivos
6 arquivos

Exibindo SKILL.md

SKILL.md
Instruções da origem · Visualização somente leitura
name
brownie
description
Provides guidance for shared state in React Native brownfield apps with @callstack/brownie. Define stores in TypeScript, run brownfield codegen, use the generated APIs in React Native and native hosts, and package native artifacts for integration.
license
MIT
metadata
{"author":"Callstack","tags":"react-native, expo, brownfield, state-management, brownie"}
# Overview Brownie provides cross-platform shared state for React Native brownfield apps. The workflow starts from `*.brownie.ts` store definitions, runs `brownfield codegen` (or packaging commands that include codegen), then uses typed APIs on TypeScript, Android, and iOS sides. # When to Apply Reference this skill when: - Setting up `@callstack/brownie` in an existing brownfield app - Defining or changing store schemas in `*.brownie.ts` - Using `useStore`, `subscribe`, `getSnapshot`, or `setState` on the JS side - Registering and consuming stores in Android or iOS hosts - Packaging and embedding iOS frameworks that include Brownie # Quick Reference - Install Brownie: ```bash npm install @callstack/brownie ``` - Generate native types: ```bash npx brownfield codegen ``` - Packaging commands also include Brownie codegen: ```bash # iOS npx brownfield package:ios --scheme YourScheme --configuration Release # Android npx brownfield package:android --module-name :YourModuleName --variant release npx brownfield publish:android --module-name :YourModuleName ``` ## Routing (concern -> file) Concern | Read --------|------ Initial install, prerequisites, setup sequence, first integration pass | [`getting-started.md`](references/getting-started.md) `*.brownie.ts` schema rules, `BrownieStores` augmentation, type mapping, when to rerun codegen | [`store-definition-and-codegen.md`](references/store-definition-and-codegen.md) `useStore` selectors, update patterns, low-level APIs (`subscribe`, `getSnapshot`, `setState`) | [`typescript-usage.md`](references/typescript-usage.md) Android registration lifecycle, serializer options, package settings, build and publish flow | [`android-usage.md`](references/android-usage.md) Swift store registration and UI usage, plus XCFramework packaging and embedding | [`swift-and-xcframework.md`](references/swift-and-xcframework.md) ## Retrieval and Response Rules - Single-reference-first: choose exactly one primary reference from the table above that best matches the request before opening any other file. - Stop-after-sufficiency: once the required command/API is found for the request, stop reading additional references. - Cross-reference only when blocked: open a second reference only if the first one does not contain the needed command/API. - Testing-context response budget: - Return compact actionable steps only. - Use at most one code snippet. - Do not restate overview/scope/background sections.
Ver no GitHub