AI rules included · Codex · Antigravity · Cursor · Claude · Windsurf

The senior toolkit your AI doesn’t have.

Cursor, Claude, Codex, and Antigravity generate React in an afternoon. The architecture, performance, and review patterns that keep it shipping past month three — plus drop-in rules for all five tools — are in this book.

7-day refund · lifetime updates · team licences available

React - The Road To Enterprise — TypeScript Edition book cover

Why this book exists

Your AI ships fast. This book ships what survives

AI codegen is fast. AI codegen also ships React that compiles, runs, and quietly collapses six months later — scattered fetch calls, fourteen useState hooks, no error boundaries, no type narrowing, no architecture.

This book teaches the patterns the AI doesn't ship. Folder structure, state model, API layer, performance, testing, SSR strategy — the shape of a React app that survives a year of feature work and a rotation of contributors.

It also ships an AI Rules Bundle for the five tools senior teams ship with today: AGENTS.md for OpenAI Codex, AGENTS.md + GEMINI.md + .agent/rules/* for Google Antigravity, .cursor/rules/*.mdc for Cursor, CLAUDE.md for Claude Code, and .windsurfrules for Windsurf. Drop them in your repo root and the next prompt starts following the book.

400+
pages of production React
100+
runnable code examples
9
in-depth chapters
5★
reader rating

What's inside

A complete production handbook

Not another hooks tutorial. The architecture, patterns, and decision-making senior engineers reach for every day.

Architecture that scales

Folder structure, module boundaries, and dependency rules that survive past 50 components.

Performance, measured

React Profiler-driven optimisation, list virtualisation, memo that actually works, code-splitting.

State, the right way

React Query, Redux Toolkit, Zustand, and Jotai — when to reach for each and how to combine them.

Next.js, end to end

Pick the right rendering strategy per route. SSG, SSR, ISR, and edge middleware in production.

Tests that catch bugs

Real unit, integration, and e2e patterns with Jest, Testing Library, and Cypress — no vanity coverage.

Typed end to end

Every snippet typed so the patterns survive refactors and scale to whole teams of contributors.

Why pay for this

What free tutorials skip

Most React content stops at hooks and useState. Production needs more.

Comparison between free React tutorials and this book
What you needFree tutorialsThis book
Folder architecture for 50+ components
Production API layer with React Query
Typed end-to-end (refactor-proof)
Redux Toolkit + RTK Query patterns
Zustand + Jotai for global state
Performance: memo, virtualisation, lazy
Next.js SSR / ISR / edge strategy
Real tests with Jest + Cypress
Companion app + Vite & Next.js starters
Lifetime updates as the ecosystem evolves
"React - The Road to Enterprise" is a solid overview of useful patterns and key concepts for developing real-world React applications. Rather than yet another React intro tutorial, it covers practical techniques for topics like project structure, async requests using a home-grown and with React Query [now TanStack Query], state management with Redux and Zustand, routing, bundle management, security, and testing. It's an excellent resource for anyone who is comfortable with the basics of React and is ready to put those into practice in building meaningful applications.
Mark Erikson · Redux Maintainer & Software Developer at Replay.io

Quick answers

Common questions, up front

I already use AI. Why pay for a book?
AI writes the keystrokes. You ship the system. This book teaches the patterns the AI does not — folder architecture, API layer, state model, performance, testing, SSR — so you can review what it generates instead of accepting it.
What is the AI Rules Bundle?
Drop-in rule files for the five tools senior teams ship with today: AGENTS.md for OpenAI Codex, AGENTS.md + GEMINI.md + .agent/rules/* for Google Antigravity, .cursor/rules/*.mdc for Cursor, CLAUDE.md for Claude Code, and .windsurfrules for Windsurf. Each file encodes the book’s architecture and patterns as terse, imperative rules.
Will my AI actually use these rules?
Codex picks up AGENTS.md from the repo root automatically. Antigravity reads AGENTS.md + GEMINI.md, plus granular rules from .agent/rules/. Cursor reads .cursor/rules/*.mdc (legacy single-file .cursorrules is no longer loaded in Agent mode). Claude Code reads CLAUDE.md at the start of every session. Windsurf reads .windsurfrules. Drop them in your repo root and the next prompt starts following them.

Table of contents

14 production chapters

Each chapter ends with a working pattern you can lift straight into your codebase.

  1. 01

    Introduction

  2. 02

    Project Configuration and Useful Extensions

  3. 03

    Scalable and Maintainable Project Architecture

  4. 04

    API Layer and Managing Async Operations

  5. 05

    Managing APIs with API Layer and React-Query

  6. 06

    State Management Patterns in React Apps

  7. 07

    Modern Redux - Global State Management with Redux Toolkit

  8. 08

    Global State Management with Zustand and Jotai

  9. 09

    Advanced Component Patterns

  10. 10

    Managing Application Layout

  11. 11

    Performance Optimisation

  12. 12

    Application Security

  13. 13

    React Testing - Best Practices For Writing Future-Proof Tests

  14. 14

    Static Site Generation (SSG), Incremental Site Regeneration (ISR) and Server Side Rendering (SSR) with Next.js

Inside the book

Topics, by theme

A fast scan of the patterns and techniques you'll learn — grouped so you can see exactly where your weak spots are.

Architecture & setup

  • Folder structure for 50+ component projects
  • Vite and Next.js configured for production
  • ESLint, Prettier, Stylelint, PostCSS the right way
  • Path aliases, environment splits, and module boundaries

Data & state

  • React Query as a real API layer (not a cache trick)
  • Redux Toolkit and RTK Query, typed end-to-end
  • Zustand and Jotai for slices and atoms
  • useReducer + Immer for complex local state

Component patterns

  • Compound components, render props, and slots
  • Polymorphic components with full type inference
  • Composition over configuration that actually scales
  • Dynamic layouts and route-driven UIs

Performance

  • React Profiler-driven optimisation
  • memo, useMemo, useCallback (when each helps and when it lies)
  • List virtualisation and infinite scrolling
  • Code-splitting, lazy loading, and bundle audits

Next.js & shipping

  • SSG, SSR, ISR, and edge middleware per route
  • Auth, route protection, and session strategies
  • Real testing with Jest, Testing Library, and Cypress
  • Security, headers, and Core Web Vitals

Who is this book for

Not a beginner's guide. A senior toolkit

This isn't a beginner's guide. You should already be comfortable with JavaScript, the basics of TypeScript, and React fundamentals like hooks, state, and lifecycles. If you ship code with Cursor, Copilot, or Claude Code and want to actually review what they produce, you're in the right place.

The book is written hands-on. Every concept comes with a working example you can run, modify, and steal from. Read it at your laptop, not on the train.

This book is a great resource for:

  • React developers who ship code with AI assistants and want senior eyes on the output.
  • Senior engineers cleaning up AI-assisted PRs from juniors and aligning their team on patterns.
  • Solo builders and indie hackers shipping production apps with Cursor or Claude as their main IDE.

Companion app

A working companion app

Every code example in the book exists as a runnable React project. Permissions, lazy loading, API services, layouts — open the source, copy what you need, drop it into your project. No retyping. No "left as an exercise to the reader."

Companion app — every code example as a runnable React project

Enterprise boilerplates

Vite & Next.js enterprise boilerplates

The Complete package ships with pre-configured Vite and Next.js starters: the architecture from the book, baked in. ESLint, Prettier, Stylelint, PostCSS, SCSS, sensible defaults. Clone, run, build. Designed for medium-to-large projects so you don't burn week one on plumbing.

  • Opinionated folder structure ready to scale
  • Linting and formatting wired up out of the box
  • CI-friendly scripts and conventions
  • Easy to customise if your team uses different tools

vite.config.ts

↳ src/app/ · src/features/ · src/shared/

↳ eslint, prettier, stylelint preconfigured

next.config.mjs

↳ app/ router + middleware/ + edge funcs

↳ CI, testing, and bundle audit ready

For your AI, too

AI Rules Bundle in the box

The Complete package ships a drop-in rules bundle so Codex, Antigravity, Cursor, Claude Code, and Windsurf follow the book’s patterns on every prompt.

OpenAI Codex

AGENTS.md

Codex reads AGENTS.md from the repo root automatically. Cross-tool baseline; one file teaches Codex the architecture.

Google Antigravity

AGENTS.md + GEMINI.md + .agent/rules/

Antigravity reads the cross-tool AGENTS.md plus a GEMINI.md override. Granular workspace rules live in .agent/rules/ with activation modes.

Claude Code

CLAUDE.md

Master rules file Claude reads at the start of every session. Drop in the repo root.

Cursor

.cursor/rules/*.mdc

Modern .mdc directory format with per-domain frontmatter (alwaysApply, globs). Loaded in Chat, Composer, and Agent. No legacy .cursorrules.

Windsurf

.windsurfrules

Single-file rules Windsurf loads when the workspace opens.

Versioned in changelog.md. Free lifetime updates — you get every bundle revision as new patterns ship.

Bonus videos

Three bonus videos with the Complete package

Standalone screencasts that go deeper on the topics most readers ask about.

Debugging Performance with React Profiler

Use the React Profiler to find render hot-paths, eliminate wasted renders, and fix performance bottlenecks before they ship.

Compound Components Pattern

Build a flexible Tabs component with hooks and Context that gives users full control over layout and style — without prop explosions.

Cleaner Code with Modern JavaScript

Modern JS features that keep your codebase readable and your mental model small as the project grows.

Everything you get

More than a book

  • The 400+ page book

    PDF with searchable text, dark and light themes.

  • AI Rules Bundle

    AGENTS.md, GEMINI.md, CLAUDE.md, .windsurfrules, .cursor/rules/*.mdc, and .agent/rules/ — ready to drop in your repo for Codex, Antigravity, Cursor, Claude Code, and Windsurf (Complete package).

  • Companion app

    Every code example as a running, navigable React project.

  • Vite & Next.js boilerplates

    Pre-configured starters with the architecture from the book baked in.

  • Bonus videos

    Compound Components, React Profiler deep dive, and modern JS techniques.

  • Lifetime updates

    Every revision — including React 19+ and future Next.js majors — is free.

  • 7-day refund

    Not for you? Email within 7 days for a full no-questions refund.

About the author

Written by Thomas Findlay

Thomas Findlay

Thomas Findlay is a CTO, senior full-stack engineer, and the author of React - The Road To Enterprise and Vue - The Road To Enterprise. With 13+ years of experience, he has built and led engineering teams, architected multi-tenant SaaS platforms, and driven AI-augmented development workflows that cut feature delivery time by 50%+.

Over the years, Thomas has worked with developers and teams ranging from beginners to advanced engineers, helping them build and scale production applications. He specialises in JavaScript, TypeScript, Vue, Nuxt, React, Next.js, Node.js, and modern web platform patterns.

He holds an MSc in Advanced Computer Science with Distinction from the University of Exeter and a First-Class BSc in Web Design & Development from Northumbria University.

CTO · MSc Advanced Computer Science (Exeter) · 13+ years

What developers say about Thomas

Trusted by the developers he's mentored

Before he wrote the book, he spent years 1:1 with hundreds of developers, debugging real codebases. Some of what they had to say:

Thomas has been instrumental in my development as a web developer. In particular his knowledge of Node, front-end frameworks, and JavaScript in general, as well as a variety of web development concepts, has really helped me to rapidly build up my skills and understanding. He has been very thorough in code reviews, is quick to understand the purpose and structure of my apps, and evaluate them based on his knowledge of best-practice. I look forward to more sessions with him!
SimonMentorship client
Thomas is absolutely BRILLIANT! I spent more than 30 hours on a feature, which 30 hours didn't even get me near as far as I hoped... Then when I was at my wits end with fighting this build out. Thomas was able to assist me in a matter of 2 hours, and that was including a little fancy styling... I absolutely RECOMMEND THOMAS!!! THANKS THOMAS!!
ChaseMentorship client
This guy is the best developer I have ever encountered in my entire career, he understands everything in seconds, and guides you through the solution in the clearest way possible, definitively hire him right now.
Sergio MorenoMentorship client

Testimonials

Five-star feedback from engineers shipping at scale.

Most tutorials and books teach you fundamentals of React but they don't help much when it comes to best practices or how your code should scale to production levels. Not only will you learn how to code but you will see real applications, testing using modern industry techniques and a very in depth step by step guide showing you how to do everything. If your goal is to stand out in the Marketplace as a React developer, this is the book you should be reading to make that happen. 10/10 definitely recommend.
Danny Thompson portraitDanny Thompson · Director at Atlassian
"React - The Road to Enterprise" is a solid overview of useful patterns and key concepts for developing real-world React applications. Rather than yet another React intro tutorial, it covers practical techniques for topics like project structure, async requests using a home-grown and with React Query [now TanStack Query], state management with Redux and Zustand, routing, bundle management, security, and testing. It's an excellent resource for anyone who is comfortable with the basics of React and is ready to put those into practice in building meaningful applications.
Mark Erikson portrait
Mark EriksonRedux Maintainer & Software Developer at Replay.io
Thomas Findlay's Advanced ReactJS book is an exceptional resource that offers comprehensive content in a structured approach. The book covers a wide range of advanced topics, including component patterns, performance optimization, state management, routing, and testing. It keeps pace with industry standards, introducing popular tools like Redux, React Router, Jest, cypress, and so much more. The teaching style is engaging and practical, breaking down complex concepts into digestible modules and providing real-world examples. Completing the book has significantly improved my React skills and equipped me with the knowledge and confidence to tackle complex projects. I highly recommend this book to anyone because it's constantly being updated, and if you are looking to enhance your React skills, this will help significantly.
Chinedu Okere portrait
Chinedu OkereSoftware Engineer and Technical Writer
If you want to delve into design patterns and architecture of applications built on React, this is your book. It is very easy to read and the examples with code help to follow the explanations perfectly. 100% recommendable.
Gerardo Fernández Moreno portrait
Gerardo Fernández MorenoChief Team Officer (CTO) at Legit.Health
One of the best materials I have read. Thomas really did a good job with this. It's an excellent book and I have been using it for a while now.
Abdullah Clement Abdul Shakur portrait
Abdullah Clement Abdul ShakurLead UI/UX and Frontend Developer at Wigal
Before now, I had only ever used React on a couple of demo projects but Thomas' book exposed me to many advanced concepts that are helping me with a new React project I'm working on. Highly recommended 👍
Jon Jackson portrait
Jon JacksonTech Founder & Senior Lecturer at Buckinghamshire New University
As a self taught React developer, I wasn't explicitly exposed to subtle things like proper directory structure, config files, separation of concerns and the such. This book fills in those gaps.
DeVontae Moore portrait
DeVontae MooreReact Native Developer

I've been reading React - The Road To Enterprise from Thomas and so far I learned:

  1. 1. I don't know as much as I thought
  2. 2. I have no clue how you design such clean code
  3. 3. I want to keep reading because I want to LEARN more

Great call buying the book. The quality is really top-notch, and it teaches non-trivial stuff that is relevant to our day-to-day job.

Definitely a gem. Go grab it if you are serious about web development!

Juan Alvarez portrait
Juan AlvarezFront End Web Developer & Technical Writer
I am really satisfied with the practicality and knowledge outlined in React book by Thomas. Thanks fam.
Ilya Lutay portrait
Ilya LutaySoftware Developer at Playrcart
I skimmed the book and can already say that book is a steal. I can recommend books from Publishers like Manning and Packt but don't hesitate to buy Thomas's book. It is superb so far. You have done a brilliant job, Thomas.
Hakan Bilgo portrait
Hakan Bilgo
I just finished over 300 pages of the book. It's amazing! I learned way more from "React - The Road To Enterprise" than from other standard React books. This book is very practical, and much of the stuff I learned can be applied to my projects immediately. I think it's definitely worth the money.
Rui Cheng
I bought the "React - The Road To Enterprise" book after finishing EpicReact. I did not go through even half of the book yet but already learnt a lot! Besides React, I also learned many things about Typescript. React and Next.js boilerplates are pure gems.
Piyush Chatterjee
I found Thomas's book while looking for advanced concepts in React. When I emailed him my question, he was helpful in letting me know the pattern I was looking for; I bought his book and found what I exactly needed, even as a use case is covered in his book. His book is a treasure for me because he also covers other advanced concepts besides libraries we currently discuss in my work, such as React Query [now TanStack Query].
Tarek Hassan
It's an excellent ebook, the content is amazing and very very well explained.
Pedro Henrique Cabral Braga

Pricing

Start The Road To Enterprise

Choose the package that suits you and join thousands of developers who learn from Thomas.

…and if for some reason you don't think it's for you, just let me know within a week. You will get a refund with no questions asked ;)

The Essentials

  • check-icon

    The 400+ pages TypeScript Edition book in a PDF format

  • check-icon

    Compound Components Pattern (video)

  • check-icon

    Free lifetime access to all book updates

The Complete Package

  • check-icon

    The 400+ pages TypeScript Edition book in a PDF format

  • check-icon

    The Companion App with full code examples, components, services, and more

  • check-icon

    Pre-configured Vite and Next boilerplates

  • check-icon

    Compound Components Pattern (video)

  • check-icon

    Debugging Performance Bottlenecks with React Profiler (video)

  • check-icon

    How to write cleaner and better code using modern JavaScript features (video)

  • check-icon

    Free lifetime access to all book, companion app, and enterprise boilerplate updates

Buying for a team?

FAQ

Frequently asked questions

Currently, only a digital copy is available. However, drop me an email at to show interest.

Yes, an invoice will be available after the purchase.

Yes, send an email at with proof that you are a student to get 10% off.

If that's the case, then drop me an email at with the country you are from, and we can have a chat.

Of course! Just send an email at and we will sort it out.

PayPal is supported only in select European countries.

Of course! Just click to see available options.

Sure, send an email at with information about how many licenses you need, and we can figure something out!

That’s ok! Drop me an email at within 7 days of the purchase to get a full refund.

Just send an email at .

Stop shipping AI slop. Start shipping a product

400+ pages, 100+ examples, drop-in AI rules bundle, lifetime updates, 7-day refund. TypeScript Edition.