React From Another Universe
summary
An OCaml reimplementation of React compiles to JavaScript (via Melange) and native code, implements SSR, Suspense streaming and server components, and ships a Next.js‑style framework called Utopia; benchmarks show faster on CPU and uses less memory than comparable Bun setups and the native build avoids eval/object pollution so certain security classes disappear. The codebase is statically typed with strong inference, supports multicore runtimes, and is a complete server+client React stack implemented in OCaml.
AI-written summary · about
chapters (21)
- 0:00Introduction to talk
- 1:13Why OCaml for React
- 2:17TypeScript limitations
- 4:43OCaml fundamentals
- 6:07Melange and React integration
- 7:32Counter example in OCaml
- 8:58Compiling OCaml to JavaScript
- 9:40React on server overview
- 10:22Server components in OCaml
- 11:26Performance benchmarks
- 12:07Security benefits
- 12:48Why spend a year on this
- 13:31React mental model
- 15:15Rendering to string
- 16:18Suspense demo
- 17:44Suspense resolved
- 18:27Server components demo
- 20:12New ecosystem creation
- 20:54Multicore OCaml potential
- 21:17Functional programming value
- 22:40Full stack with OCaml
