Menu

1 / 4

React Compiler Is Silently Skipping Your Components. Measure Coverage Like Tests

JavaScript in Plain English - Medium·Santosh Yadav·12 days ago
#HfR0GXuT
Reading 0:00
15s threshold

Member-only story

React Compiler Is Silently Skipping Your Components. Measure Coverage Like Tests

Green lint doesn’t mean compiled, and compiled doesn’t mean correct. My Three Greens check and a 43-line script that puts a number on it.

Santosh Yadav

12 min read1 hour ago

Press enter or click to view image in full size

You turned on the React Compiler. The build passed. Lint is green.

How many of your components did it actually compile?

Without extra tooling, you can’t answer that, and the compiler doesn’t volunteer it. The React Compiler is built to skip any component it can’t prove safe, and it does that quietly. No build error, no console warning. The component just runs the old way, unmemoized.

So here’s my position. The common view treats the compiler as a switch: flip it on, delete useMemo and useCallback , move on. I think it's a coverage problem, the same shape as test coverage.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.