Introducing PureScript Halogen Helix

Dear all!

I would like to introduce my recent work: Halogen Helix, a lightweight global state management library for Halogen app.

At the time of writing, there already exists a great library sharing the same purpose: halogen-store, so what is the point of adding one?
Indeed Helix shares the fundamental concepts with halogen-store, but to be sure, it differs in several points:

  • Helix is hook-first
    The Helix store can be accessed only in hook-style components. It is not impossible to connect non-hook style component to the Helix store, but to do that, you need to do some low level stuff.

  • Simple interface
    With halogen-store’s useSelector, it is also possible to access the store inside hook-style components, but the state value returned by the useSelector hook is always wrapped in Maybe context. With Helix providing functionality, the state value does not have additional Maybe.

  • More granular structuring of State type
    With halogen-store, you define a single, sometimes large, store; with Helix, you can create as many stores as you need, leading more finely structured store definition.

For more information, please refer to the README. I hope you feel like to trying it out.
Any feedback would be appreciated!


:tada: I’m happy to announce the v1.0.0 release of halogen-helix :tada:

Now you can install it with Spago, and read the API docs in the pursuit documentation site.

Since I have posted the reply-to, I have made some changes to the library:

  • simplified internal state manipulation logic
  • added middleware API, the way to extend the store behavior with almost arbitrary effectful logic
  • added some automated tests, unit and E2E