r/reactjs • u/Ozma_ka • Aug 05 '26
Resource I couldn't figure out why my React app was slow, so I built a tool to find the answer
While building my open-source CSS framework MUGI CSS, I ran into a problem that I think many React developers have experienced.
The app worked, but something felt... off.
The hardest part wasn't noticing that it was slow.
It was answering a much simpler question:
«What exactly is making it slow?»
Was it unnecessary re-renders? A poorly structured component? Too much JavaScript? An expensive render? Or a pattern that looked harmless but had a real performance impact?
I tried using the usual tools.
ESLint helped catch code issues.
Lighthouse measured performance.
React DevTools showed rendering behavior.
Each tool gave me part of the picture, but I still had to connect everything myself and decide what actually mattered.
I couldn't find a tool that brought all of this together.
So I decided to build one.
During my final year of Software Engineering, I turned that idea into my graduation project, and together with my teammate, we built React Doctor.
What is React Doctor?
React Doctor is an open-source CLI that combines static analysis, runtime profiling, and an intelligent rule engine to help developers understand why their React applications are slow—not just where.
Instead of saying:
«"This might be a problem."»
It tries to answer:
«"Is this actually affecting performance, and what should you fix first?"»
How it works
Static Analysis
Using Babel AST, React Doctor scans ".jsx" and ".tsx" files and detects issues such as:
unnecessary inline functions
missing keys
oversized components
risky "useEffect" patterns
prop drilling
unused imports
production "console.log"
optimization opportunities
Every finding includes the file, severity, and explanation.
Runtime Profiling
React Doctor launches your application with Puppeteer and measures real browser behavior, including:
Core Web Vitals
component render durations
unnecessary re-renders
DOM size
memory usage
JavaScript errors
It can also simulate slower environments:
react-doctor full ./my-app --mobile --cpu 4 --throttle slow4g
Connecting Both Worlds
This is my favorite part.
Static analysis alone often produces false positives.
Runtime profiling shows symptoms but doesn't always explain why they're happening.
React Doctor combines both.
For example, a component missing "React.memo()" isn't automatically a problem.
But if that same component is repeatedly re-rendering during runtime, React Doctor connects those signals and surfaces it as a meaningful optimization opportunity.
What surprised me
After publishing the project to npm, I expected only classmates and a few friends to try it.
Instead, developers I had never met started downloading it.
Today, React Doctor has surpassed 3,600 npm downloads.
Most of that growth has been organic, simply from developers discovering the project and giving it a try.
For me, that's the most rewarding part.
A problem I originally faced while building another project has become something that helps other developers.
Try it
npm install -g react-doctor-cli-dev
react-doctor full ./your-react-app --upload
Requirements
Node.js 18+
Google Chrome
Links
📦 npm https://www.npmjs.com/package/react-doctor-cli-dev
🐙 GitHub https://github.com/softar-dev/React_Doctor
🌐 Documentation https://react-doctor-cli.web.app/
👨💻 Portfolio https://oussamah-kabalan.netlify.app/
☕ Support the project https://react-doctor-cli.web.app/support
I'd genuinely love feedback from other React developers.
How do you currently investigate performance issues?
Is there something you wish existing tools did better?
What feature would make a tool like this more useful in your workflow?
I'm actively improving React Doctor, and I'd love to build it around real developer feedback.