~/talk

Universal React in OCaml

Talkat FUN OCaml 2024 · 2024-09-16..09-17· [react, frontend-architecture]
links:none on file
slides:none on file

server-reason-react implements react-dom/server in OCaml to natively render HTML for Reason React apps and enable one shared component compiled to JS or OCaml, letting Ahrefs migrate ~2,000 files to server rendering. The project reimplements three server render functions, adds a browser-only PPX and switch_platform support to swap client/server implementations, embeds QuickJS for regex parity, and reports microbenchmarks showing up to ~34× speedups against older Node/Bun baselines. Future work targets server components and a lightweight meta-framework.

AI-written summary · about

  1. 0:00Introduction and background
  2. 1:46What is React and ReasonReact
  3. 2:48Client vs server rendering
  4. 4:30Benefits of server rendering
  5. 5:56Reimplementing React for server
  6. 6:38Universal React components
  7. 8:03Performance benefits of OCaml
  8. 9:31Challenges with universal code
  9. 11:38Binding browser APIs
  10. 13:01URL and regex in universal code
  11. 15:11Reimplementing regex engine
  12. 17:19Using QuickJS for regex
  13. 18:01Migration progress and results
  14. 18:23Creating new ecosystem tools
  15. 19:48Future: Server-side components
  16. 20:32Future: Meta framework
  17. 21:12Q&A: Library differences
  18. 23:42Q&A: User experience and trade-offs
  19. 24:04Q&A: JavaScript engine dream
  20. 24:48Q&A: Developer experience evolution
~/search
type to search 8,222 conferences, 162,397 speakers and 219,688 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
← →
on a talk: 5 seconds back / forward
0–9
on a talk: jump to 0%–90% of the recording
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.