DEV Community

Jules Sarah
Jules Sarah

Posted on

Claude Code Is Only as Good as the React Native Repo You Point It At

There's a pattern in every "AI coding is overrated" thread. Someone points Claude Code at their React Native project, asks for a feature, gets a mess, and concludes the tool is hype. Someone else points it at a different repo, asks for the same thing, and ships the feature before lunch.

The difference usually isn't the prompt. It's the repo.

Coding agents are imitation machines. They read the code around the task and extend the patterns they find. Give them a codebase with one clear way of doing things and they multiply it. Give them a codebase with three navigation setups, two fetch patterns, and a 900-line screen, and they'll faithfully produce a fourth navigation setup. The repo is the prompt.

Here's what actually moves the needle for React Native projects.

1. Write a CLAUDE.md before you write another prompt

Claude Code reads a CLAUDE.md at the repo root automatically. Most projects don't have one, which means the agent re-derives your stack from scratch every session. Mine looks roughly like this:

# Project
Expo SDK 53, expo-router (typed routes), TypeScript strict.

# Conventions
- State: Zustand for client state, TanStack Query for server state
- All data access goes through src/api/. Never call supabase directly from screens.
- Styling: unistyles tokens from src/theme. No inline hex colors.

# Commands
- npm run typecheck
- npm run lint
- npm test
- npx expo start

# Don't
- Don't add new dependencies without asking
- Don't edit files in src/generated/
Enter fullscreen mode Exit fullscreen mode

Thirty lines. It removes the entire category of "technically correct code in the wrong style" and stops the agent from installing a second date library.

2. One way to do each thing

This is the highest-leverage change and it has nothing to do with AI, which is exactly why it works. Agents pick the nearest example and copy it. If your repo fetches data three ways, the agent picks whichever file it read last.

Audit for one pattern each: one navigation approach, one data-fetching layer, one form setup, one styling system. Delete the strays. Every duplicate pattern in your repo is a coin flip you're handing the agent.

3. Make the repo self-verifying

Claude Code is dramatically better when it can check its own work. That means fast, runnable feedback loops:

  • Strict TypeScript. Every hallucinated prop and misnamed hook becomes a compile error the agent sees and fixes itself, instead of a runtime crash you find on device.
  • Typed routes in expo-router. A wrong href fails typecheck. Without it, it fails in the user's hand.
  • Scripts that run headless. typecheck, lint, test as npm scripts the agent can execute after every change. If your test suite needs a simulator and three manual steps, the agent skips verification, and so does the code quality.

The loop you want: agent writes, agent runs typecheck, agent fixes, you review a diff that already compiles.

4. Keep files small enough to read

Agents work inside a context window, and a 900-line screen component eats it. Files under ~200 lines with clear names get read whole; God-components get read in fragments, and fragments produce fragment-quality edits. Colocate the query, the types, and the component for a feature so one directory tells the whole story.

5. Know what to delegate and what to keep

After months of running Claude Code on RN projects, the split is pretty consistent.

Delegate freely: wiring new screens from existing patterns, refactors across many files, writing tests for existing logic, dependency upgrades with their config changes, form plumbing, and the long tail of "make this screen match that screen".

Keep your hands on: native module and config-plugin work (the agent can't run the iOS build), anything visual (it can't see the screen), platform-specific quirks like keyboard behavior, and architecture decisions. The agent extends architecture well and invents it badly.

That last sentence is the whole article, honestly.

6. Never start it on a blank folder

A blank folder is the worst possible context: no conventions to imitate, so the agent invents an architecture token by token, and you inherit whatever it improvised. Starting from a well-structured starter flips the dynamic. The conventions exist, the CLAUDE.md exists, the verification loops exist, and every feature you ask for is an extension instead of an invention.

That's the real reason starter kits aged well in the agent era instead of dying. A reviewed template is context engineering you didn't have to do; it's what we curate for on AppLighter, where React Native templates are vetted for exactly the things above: one pattern per concern, strict types, and a structure an agent can extend without supervision.

Point Claude Code at a repo like that and the "AI coding is overrated" thread starts to look like a repo problem wearing a tooling costume.

Top comments (0)