Renderless components are one approach for code reuse among Halogen components. By abstracting out the render function altogether, you can implement the component's behaviors and state without making any rendering decisions as a library author. As a library user, you can implement your rendering however you see fit and you can selectively attach the behaviors that have been made available to you.
This repository contains two things:
- the minimal implementation for a renderless component you can use as a template for your own components in
- a library of helper functions for working with the
Storecomonad for your component state in
The component implemented in this project is a working renderless component. Either take it and use it as a scaffold for a new component you're building and would like to share, or use it to update an existing component to be renderless.
# psc-package psc-package install halogen-renderless # bower bower install purescript-halogen-renderless
Module documentation is published on Pursuit.
Renderless Components Built With This Library
For demonstration purposes the renderless components in this repository are a fully-functioning Halogen app. The
/example folder contains scaffolds for renderless components you can use to get started, and demonstrate the library helper functions in use.
yarnwill install everything you need
yarn buildwill build the project, which you can view at
Check out the contribution guidelines to get started and see helpful related resources.