Integrating Purescript and Halogen into Javascript Apps - Part 6 of 6
summary
Shows incremental replacement of a JavaScript React UI with PureScript and Halogen, actually implementing a Halogen product component with a concrete state (price quantity title), using PureScript's Aff vs Effect (F vs Aff) distinction and the Halogen query algebra. Builds a hacky but working component runner that embeds Halogen into a DOM node from JS, where runUI returns a callback used to submit new state via a handleState query action; error handling is minimal and the runner is proof‑of‑concept rather than production ready.
AI-written summary · about
chapters (10)
- 0:00Introduction
- 1:18Halogen component setup
- 3:23PureScript F and effects
- 8:01Component state and algebra
- 13:48Halogen component structure
- 20:18Render and eval functions
- 27:38JavaScript runner for Halogen
- 33:02Halogen with React
- 39:51Incremental PureScript adoption
- 45:09Summary
related talks
01h 04mJavaScript to Purescript A Migration Story
47mFunctional Programming on the Web
43mThe Pure Functional Web
28mPureScript & Pux -- a safer, more expressive way to React
01h 49mPurely Functional Web Apps using React and PureScript
49mPurescript (Maybe this time we get Javascript right)
45mPureScript (Maybe This Time We Get JavaScript Right)
36mFunctional reactive UI with JavaScript
