I’m proud to announce today that I’ve released purescript-halogen-hooks, an implementation of Hooks for Halogen!
I’ve also written a short but comprehensive introducing to Hooks: why they’re useful, how they work, and how they can make your Halogen applications better:
Hooks are an alternate approach to stateful code in Halogen that make it much easier to reuse code among components. They also happen to be a more convenient way to define components in general.
One thing that’s especially cool about Halogen is that a feature like this can be implemented entirely as an external library. PureScript and Halogen are both so powerful with such small cores that libraries like this are downright pleasant to implement. There are no changes to the underlying Halogen library.
If you use Halogen, I hope you try out Hooks and see how they feel in your application!