A focused experimental starter for FARMJS's React AOT compiler. It uses the same minimal dark shell as the other Create FARMJS App starters and includes one live comparison: an eligible local state update beside ordinary React reconciliation.
Current starter baseline: Farm.js 0.1.0 and Farm React 0.1.0-beta.16.
Core is stable; the separately versioned React compiler/runtime remains beta.
Requires Node.js 22.13 or newer.
The compiler is experimental. Unsupported component shapes stay on React, so the optimization is never required for correctness.
git clone https://github.com/farming-labs/farmjs-react-compiler-starter.git
cd farmjs-react-compiler-starter
pnpm install
pnpm devOr generate the same project through Create FARMJS App:
pnpm create @farm.js/app@0.1.0 my-compiler-app --template react-compiler --typescript
cd my-compiler-app
pnpm devThe starter enables the compiler through the React renderer:
renderer: react({
experimental: {
compiler: true,
},
}),The included environment switch defaults to enabled and makes comparison builds easy:
FARM_REACT_COMPILER=true pnpm build
FARM_REACT_COMPILER=false pnpm buildThe status shown on the starter page reflects the resolved value used for that build.
Components are considered automatically. Add "use no compiler" to a component when you need an
explicit React-only path.
pnpm exec playwright install chromium
pnpm experimentThe command builds the app, opens the production output in Chromium, checks both counters, verifies
that the compiled update does not execute the component again, and saves a screenshot to
/tmp/farm-react-compiler-starter.png.
For batching, multiple bindings, safe keyed-list fallback, and the full compiler-on/off benchmark, see the maintained React Compiler example.
Read the React compiler guide for the supported component contract and rollout guidance.