Edited by humans. Written by AI. How our editing works
All articles

React Doctor Scans Your Code for Anti-Patterns in Milliseconds

React Doctor is a Rust-powered CLI tool that detects common React anti-patterns and performance issues in milliseconds. Here's what it actually finds.

Zara Chen

Written by AI. Zara Chen

February 19, 20264 min read
Share:
Terminal screen showing a critical error in react-doctor with 42/100 health status and npm install command displayed…

Photo: Better Stack / YouTube

There's a new code quality tool making rounds in React circles, and it comes with a premise that's either reassuring or mildly alarming depending on your confidence level: it can scan your entire codebase and tell you exactly where you're messing up React best practices.

React Doctor, created by Aiden Bai (the developer behind Million.js, React Scan, and other performance-focused tools), is a CLI tool that hunts for common React anti-patterns—things like unnecessary useEffect calls, accessibility issues, and prop drilling. The interesting bit? It does this in milliseconds, even on massive codebases.

How It Actually Works

Under the hood, React Doctor uses oxlint, a JavaScript linter written in Rust. The Rust foundation is what makes the speed claims plausible—it can tear through tens of thousands of lines of code before you've finished your coffee.

The tool builds an abstract syntax tree of your project, analyzing specific React patterns: how you're using hooks, structuring props, defining component boundaries. It currently checks against 47 React best practices, including some legitimately useful catches. One example: it flags hardcoded security keys (oops). Another: it recognizes loading state patterns and suggests when useTransition might be a better choice than your current approach.

Andress from Better Stack tested it on a six-year-old React project he'd written—"back when AI wasn't even a thing yet," as he puts it. The scan was instant. Results: nearly perfect score. The tool flagged using i as a key (valid), suggested lazy loading for the heavy recharts library (also valid), and noticed four useState calls in a single useEffect that should probably be useReducer instead. All defensible suggestions.

Then he ran it on Twenty, an open-source CRM aiming to be a Salesforce alternative. React Doctor automatically detected the monorepo structure and analyzed packages separately. The marketing site package? Mostly clean—one missing alt tag. The front package? 99 errors, but still in the "green zone" according to the tool's scoring system.

The Open Source Angle

React Doctor is completely open source and still pretty fresh, which creates an interesting dynamic. The 47 best practices it currently checks are just... someone's initial list. The community can contribute additional checks, which means the tool's usefulness will depend heavily on whether the React community actually rallies around it.

This is both strength and limitation. On one hand, it's adaptable—if your team has specific conventions or you notice patterns the tool misses, you can add them. On the other hand, it's only as comprehensive as its contributors make it. Right now, it's catching the obvious stuff. Whether it evolves to catch the subtle architectural issues that separate okay React code from great React code remains to be seen.

What This Means for Developers

The practical applications here split into a few categories:

Portfolio building: If you're looking to make meaningful contributions to open-source projects, React Doctor gives you a roadmap. Scan a repo, find issues, submit PRs. It's strategic, if a bit mechanical.

Code review assistance: The tool can catch patterns humans might miss in large PRs. Four useState calls in one useEffect? Easy to overlook when you're reviewing 2,000 lines of changes. A tool won't.

AI agent training: You can run React Doctor as a "skill" for coding agents or use it programmatically via a Node.js API. This positions it less as a one-time linter and more as ongoing infrastructure. Your AI pair programmer gets a medical degree in React, as Andress puts it.

The UI design is apparently quite nice—unusual praise for a CLI tool, but the aesthetic matters when you're staring at error reports.

The Tensions Nobody's Talking About

Here's what's interesting: tools like React Doctor codify current best practices, which is useful until those practices evolve. React itself has gone through major paradigm shifts—classes to hooks, prop drilling to context to state management libraries to server components. A tool checking against "47 best practices" is checking against today's consensus, which may not be tomorrow's.

There's also the question of what these tools optimize for. Speed? Bundle size? Developer experience? Accessibility? These goals sometimes conflict. A tool that flags "unnecessary" patterns needs a framework for determining necessity, and that framework contains assumptions.

Andress suggests using React Doctor to "proofread and sanity check" projects, which feels like the right framing. It's a second pair of eyes, not a replacement for understanding why these patterns matter or when breaking the rules makes sense.

For developers six years into their careers running scans on old code, the tool offers a different kind of value: evidence that you knew what you were doing, or a record of how much you've learned since. Both are worth something.

—Zara Chen, Tech & Politics Correspondent

From the BuzzRAG Team

We Watch Tech YouTube So You Don't Have To

Get the week's best tech insights, summarized and delivered to your inbox. No fluff, no spam.

Weekly digestNo spamUnsubscribe anytime

More Like This

A URL comparison showing "http://localhost:3000/myapp" with a red X on the left and green checkmark on the right against a…

Vercel's Portless Tool: Weekend Project or Real Solution?

Vercel Labs released Portless to eliminate localhost port conflicts. Does this weekend project solve a real problem, or create new ones?

Rachel "Rach" Kovacs·5 months ago·5 min read
A retro arcade-style diagram showing a 200x combo multiplier with numbered stages 1-4 connecting to a central red starburst…

This Free Tool Lets You Run Multiple AI Agents At Once

Collaborator is an open-source app that orchestrates multiple Claude AI agents in one workspace. Here's what it actually does—and what it can't.

Zara Chen·4 months ago·6 min read
A man in business attire smiles beside large text reading "CAVEMAN" with a subtitle about token efficiency, featuring…

The Caveman Skill Makes AI Shut Up and Save You Money

New Claude skill cuts AI verbosity by 45%, potentially saving token costs—but the math gets complicated. Here's what actually works and what doesn't.

Zara Chen·3 months ago·5 min read
Yellow arrow pointing from "Goodbye ElevenLabs" text toward a colorful logo with wave graphics on dark background

Chatterbox Turbo: The Open-Source TTS Revolution

Discover Chatterbox Turbo, a fast, open-source TTS tool that's transforming voice tech.

Zara Chen·7 months ago·3 min read
Bold yellow text "STOP WRITING SCHEMAS" with tangled scribble transforming into organized grid on dark background

How LangExtract Cleans Up Messy Data, Google Style

Explore how Google's LangExtract transforms chaotic text into structured data with ease.

Zara Chen·6 months ago·3 min read
Man in tuxedo gesturing beside "GOODBYE BUBBLE" text and Bubble logo on dark background

AppSmith Wants to Kill Your Admin Panel Boilerplate

This open-source tool promises to replace repetitive internal tool development. But does it actually deliver, or just move the complexity elsewhere?

Zara Chen·4 months ago·5 min read
Man with serious expression next to Claude Design by Anthropic Labs logo on black background

I Tested Claude Design: Here's What Happened to My UI

Developer OrcDev spent hours testing Anthropic's Claude Design AI tool. The results reveal what AI can—and critically can't—do for interface design.

Zara Chen·3 months ago·5 min read
Man in beige shirt with surprised expression next to "Introducing Opus 4.7" text and colorful design elements on cream…

Anthropic's Opus 4.7: When Safety Guardrails Lobotomize the Model

Anthropic's Opus 4.7 shows promise in coding tasks but aggressive safety filters are blocking legitimate work. Is the tooling worse than the model?

Dev Kapoor·3 months ago·6 min read

RAG·vector embedding

2026-04-15
1,072 tokens1536-dimmodel text-embedding-3-small

This article is indexed as a 1536-dimensional vector for semantic retrieval. Crawlers that parse structured data can use the embedded payload below.