# React Reconciliation Lab

By Chason Arthur
Revision 132.048
Published/updated 2026-11-04

## Start without installing dependencies

Extract this complete ZIP into a new folder. With Python 3 installed, run `python preview.py` from the extracted root. Open http://127.0.0.1:4210/. Stop with Ctrl+C. The prebuilt site is self-contained and makes no automatic external requests. Written reference links are optional. Do not open the files directly with file:// because workers and Wasm need HTTP.

## Run the native exercise

```sh
npm ci
npm test
npm run rebuild
python preview.py
```

The source uses a pure server/reconciliation model and real React components. Native tests cover the decision functions; the prebuilt browser is where you check input identity, focus and pending/reset behavior. The timed server is an in-memory teaching fixture.

## Expected result

A rejected save returns the safeguarded editor to two seats. A competing edit preserves the server’s newer four-seat record. A successful save updates the safeguarded summary to three seats.

## Scope

This is a real React application with a timed, in-memory server fixture. It demonstrates UI state and version checks; it does not connect to a reservation service or implement a production Next.js server.

## Change and rebuild

Node/browser packages: `npm ci`, `npm run rebuild`, then `python preview.py`. Go: edit src/go, run its tests and `python rebuild_wasm.py` before refreshing source. Python: edit src/python/engine.py and run `python refresh_source.py`. Rebuild keeps the local preview and source viewer aligned. FILE_MANIFEST.json describes the initial extracted package, not later edits. The source-map and source viewer manifest record the exact teaching files. Update edition/date metadata before publishing an edited version.

## Extension

Add a second editable field and a field-level validation error. Preserve an unsaved draft when a conflict arrives, then offer an explicit review-and-retry action instead of silently overwriting the newer record.

Original teaching code and lessons are MIT-licensed. See THIRD_PARTY_NOTICES.md and licenses/. The package starts no production API, model, payment, email or cloud service.
