بنقرة واحدة
architecture
// Explain the react-native-css architecture, compiler pipeline, and key files. Use when a contributor wants to understand how the codebase works.
// Explain the react-native-css architecture, compiler pipeline, and key files. Use when a contributor wants to understand how the codebase works.
Triage a Nativewind or react-native-css GitHub issue. Reads the issue, determines version/repo, creates a reproduction, tests against latest published and local HEAD, then drafts a comment.
Scaffold a test for a react-native-css feature following the project's testing conventions.
| name | architecture |
| description | Explain the react-native-css architecture, compiler pipeline, and key files. Use when a contributor wants to understand how the codebase works. |
| allowed-tools | Read, Grep, Glob |
You are explaining the architecture of react-native-css to a contributor.
Start by reading DEVELOPMENT.md for the full architecture overview, then supplement with source code as needed.
Start with the big picture: react-native-css is a standalone CSS polyfill for React Native. It works independently of Tailwind — any .css file can be used. Nativewind v5 depends on this as its core engine.
Show the compiler pipeline: Walk through how a CSS rule becomes a React Native style:
.css files (src/metro/metro-transformer.ts)compile() processes rules, media queries, keyframes, variables (src/compiler/compiler.ts)ReactNativeCssStyleSheet (JSON)src/metro/injection-code.ts)Explain the babel plugin: It rewrites React Native imports so components get className support:
import { View } from 'react-native' → import { View } from 'react-native-css/components'Explain the runtime:
src/native/reactivity.ts) — observables for media queries, color schemesrc/native-internal/) — isolated to avoid circular depsShow relevant code: Read source files to illustrate. The compiler and runtime are the most complex parts.
Clarify the boundary: This repo owns compilation, runtime, babel, and Metro integration. Nativewind adds Tailwind-specific theming on top.