# rendering-text-in-text-component

rendering-text-in-text-component is a Claude Code rule that enforces wrapping strings in React Native Text elements. It prevents runtime crashes in mobile interfaces.

- rule · `type=rule` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline · ★ 88 repo stars
- Author: alexj11324
- License: AGPL-3.0 · policy=link-only · description only; the file stays with the author
- Source: https://github.com/alexj11324/Mikka/tree/HEAD/.claude/skills/react-native-skills/rules/rendering-text-in-text-component.md
- Updated: 2026-11-17
- Security check: automated, 2026-11-17 (text) — no signs of malicious code found.
- HTML: https://affpapa.org/en/nevibecode/rules/rendering-text-in-text-component

## What it does

The rule requires placing all text strings inside `<Text>` components. Rendering raw strings as direct children of `<View>` crashes React Native applications immediately at runtime.

When writing JSX or TSX code, the assistant checks layout containers. Any text literal or interpolation inside a `<View>` is wrapped in `<Text>` to prevent runtime errors.

## Install

### Claude Code (native platform)

**Manually: put the files in place**
- File: `.claude/rules/rendering-text-in-text-component.md` — The paths frontmatter field limits the files

### Codex

**AGENTS.md**
- Codex reads AGENTS.md: paste the rule text there

### Cursor

**Manually: put the files in place**
- File: `.cursor/rules/rendering-text-in-text-component.mdc` — Frontmatter: description, globs, alwaysApply

### GitHub Copilot

**Manually: put the files in place**
- File: `.github/instructions/rendering-text-in-text-component.instructions.md` — The applyTo field sets which files it applies to

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/rules/rendering-text-in-text-component.md`

### Cline

**Manually: put the files in place**
- File: `.clinerules/rendering-text-in-text-component.md`

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/alexj11324/Mikka/tree/HEAD/.claude/skills/react-native-skills/rules/rendering-text-in-text-component.md

## When to use it
- prevent runtime crashes from raw text in View
- wrap string variables and literals in Text components
- enforce valid React Native layout structure

## Example prompts
- Build a user greeting card in React Native
- Create a profile screen with dynamic username display
- Review this TSX layout for text rendering issues

## Similar
- [preview-screens](https://affpapa.org/en/nevibecode/skills/preview-screens.md) — skill · ★ 1167 repo stars
- [pixijs-rendering](https://affpapa.org/en/nevibecode/skills/pixijs-rendering.md) — skill · 10800 installs
- [remotion-component-gen](https://affpapa.org/en/nevibecode/skills/remotion-component-gen.md) — skill · 172 installs
- [one-component-per-file](https://affpapa.org/en/nevibecode/rules/one-component-per-file.md) — rule · ★ 1120 repo stars
- [rendering-animate-svg-wrapper](https://affpapa.org/en/nevibecode/rules/rendering-animate-svg-wrapper.md) — rule · ★ 7191 repo stars
- [rendering-activity](https://affpapa.org/en/nevibecode/rules/rendering-activity.md) — rule · ★ 1064 repo stars

From the same set: [alexj11324/mikka](https://affpapa.org/en/nevibecode/by/alexj11324/mikka.md) — 47 cards

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
