The Road to Ocelot
summary
Company runs PureScript and Halogen in production for about nine months and ships an open source component library called Ocelot, built from ~30,000 lines. The concrete claim is that small UI bits should be pure functions not Halogen components, using arrays of iProps and children instead of big config records. The implementation shows custom props (example pullElevate) with careful monomorphic unsafeCoerce to keep typesafe and the pattern evolves away from the Halogen DSL toward ergonomic, composable element functions.
AI-written summary · about
chapters (15)
- 0:00Introduction
- 1:37Journey with Halogen and PureScript
- 3:07PureScript for production
- 4:39Component design challenges
- 8:38Halogen vs React components
- 10:10Pure functions for components
- 12:17Components vs functions
- 17:04Button component design
- 21:11Config records problems
- 23:24Simpler button function
- 27:00Breaking buttons apart
- 28:28Custom props for config
- 34:03Final button refinement
- 45:17Q&A
- 51:03Ocelot library summary
related talks
24mDesigning Components for Fun, Profit and Sanity
30mRecomposing your React application
44mBest Practices on building a UI component library for your company
38mUnleash the power of the higher-order components
51mBuilding Better Components — A Journey to a More Resilient Frontend
25mSimply React
23mJSConf 2015 Chris Lorenzo
49mBuilding Better Components - A Journey to a More Resilient Frontend
