janestreet/bonsai: A library for building dynamic webapps, using Js_of_ocaml ·
Bonsai is a UI library for building performant, reactive web applications in OCaml, partly inspired by Elm. It is used to build almost all web applications inside Jane Street, everything from the corporate directory to tools that monitor and interact with our trading systems. A simple Bonsai component with a little interactivity looks like this: Components are implemented as purely functional state machines, and are easily composable. Incrementalization inside the framework means that values don’t get recomputed until necessary. This applies to every value, not just the view. Other web frameworks tend to lump together state, incrementality, and rendering into a single abstraction, the UI component. By contrast, Bonsai allows you to compose state and incrementality primitives a la carte. The same primitives that prevent re-rendering the entire page during user interaction can also be used to incrementalize an expensive business logic computation on a live-updating dataset. (If you're us
Bonsai Bonsai is a UI library for building performant, reactive web applications in OCaml, partly inspired by Elm. It is used to build almost all web applications inside Jane Street, everything from the corporate directory to tools that monitor and interact with our trading systems. A simple Bonsai component with a little interactivity looks like this: module Dice = struct let faces = [ "⚀"; "⚁"; "⚂"; "⚃"; "⚄"; "⚅" ] ;; let component (graph @ local) = (* Components are implemented as purely functional state machines. *) let face, set_face = Bonsai.state (List.hd_exn faces) graph in (*…
saved by
related reading
- An O(x)Caml book that runs · KC Sivaramakrishnankcsrk.info
- floguo's artifactsfloguo.com
- playhtml — make the web feel aliveplayhtml.fun
- UI Skills for Design Engineers | UI Skillsui-skills.com
- Building data-centric apps with a reactive relational databaseriffle.systems
- srclsacred.computer
- Subframe – The AI design tool built for codesubframe.com
- v0 by Vercel - Build Full-Stack Web Apps with AIv0.dev
- Canvas UI: Creative Canvas, WebGL and WebGPU Component Librarycanvasui.dev
- The Descent — What Happened to the Frontend While You Weren't Watchingdavidpoblador.com
- Magic UImagicui.design
- Introduction | Canvas UIcanvasui.dev