"use client"; import { useState } from "react"; let compiledExecutions = 0; let reactExecutions = 0; export function CompiledCounter() { const [count, setCount] = useState(0); return (
A

AOT compiled

Direct DOM binding

State
{count}
Executions
{typeof window === "undefined" ? 1 : ++compiledExecutions}
); } export function BaseReactCounter() { "use no compiler"; const [count, setCount] = useState(0); return (
B

Base React

React reconciliation

State
{count}
Executions
{typeof window === "undefined" ? 1 : ++reactExecutions}
); } export function CompilerComparison() { return (
Live check

Same click. Less React work.

Watch executions after each update.

); }