Learn Halogen
Learn haskell-halogen, the Haskell port of PureScript's Halogen. Read each lesson, edit its code and press Compile to see the result beside it. GHC runs in your browser using WebAssembly. Your code stays in the browser.
The compiler download is tens of megabytes. Your browser caches it for future visits. Running it needs over a gigabyte of memory, so screens narrower than 900 pixels load it only on request.
Just want to write code? The playground lets you use the compiler on its own. Choose the libraries you need and try your own components.
- Hello, Halogen
- State and actions
- Properties and events
- Child components
- Lifecycle, forks and subscriptions
- Routing (with router)
- Fetching data (with net)
- Hooks (with hooks)
- HTML and CSS templates (with th)
- Material components (with material)
- A canvas scene (with pixi)
- Prerendering and hydration
- Testing components (with hspec)
- Your component in a page you do not write (with elements)
- One store, many components (with store)
- Watch your component live (with devtools)
- Work that must not freeze the page (with worker)
- A component that arrives later (with lazy)
- A scene in three dimensions (with three)
- Ask the compiler
- The DOM over a wire (with live)
- A view's logic as a pure step
Start with the first lesson; each builds on the one before.