Releases: theoriclabs/lean-react
Release list
LeanReact v0.1
LeanReact v0.1
LeanReact’s first release lets you write React components in Lean and reuse application types and validation rules across the UI and a Lean backend. Components compile to JavaScript and render through React.
This is an experimental release. It is intended for exploring real frontends with the supported subset; APIs and generated representations can change.
Included
- Components with typed props, state, custom hooks, callbacks, and replaceable child components.
- Forms with editable raw drafts, composed validation, focused fields, and keyed collections that retain row state through reorder.
- Context shared between separately compiled libraries through explicit JavaScript imports.
- Asynchronous resources and injectable services, with browser-memory examples and an optional LeanDB/LeanHttp backend.
- Ordinary CSS, explicit bindings for foreign React components, and generated TypeScript declarations for JS/TS consumers.
- An interactive playground, a complete first-form tutorial, and an agent skill. Engine and application examples live in separate directories.
Try it
Install Git, Node 22.13 or newer, and elan, then run:
git clone --branch v0.1 https://github.com/theoriclabs/lean-react.git
cd lean-react
npm ci
npm run devOpen http://localhost:4173. The examples use browser memory by default. The repository selects Lean 4.33.0; elan installs the selected toolchain when needed. This release is distributed as source through GitHub.
The README introduces LeanReact through familiar React concepts. Continue with the how-to guide or give your coding agent SKILL.md.
Current limits
The JavaScript compiler supports a documented subset of Lean. Arbitrary native I/O needs a host binding. CSS uses stylesheets and class names; a typed CSS API, configured Tailwind/shadcn integration, routing, React Server Components, and automatic JS/TS binding generation are outside this release. Shared libraries need explicit imports and consistent module resolution.
See implemented scope for the support contract and native setup for the optional backend’s dependencies and limits.
Verification
Release checks passed with Lean 4.33.0, Node 24.11.1, React 19.2.8, and isolated Chrome on macOS arm64:
npm test: 57 JavaScript tests plus Lean and TypeScript checks.npm run build: compiled examples and browser bundle.- All six regular Playwright tests, including mobile interactions.
- The exact README counter compiled, mounted, incremented, and retained state when its props changed.
The optional native backend was not rerun during this release check; its earlier results and limitations are recorded in the qualification history.