Skip to content

Instantly share code, notes, and snippets.

@justinwoo
Last active March 30, 2021 14:01
Show Gist options
  • Save justinwoo/98f46c00e21cd31a8df44623717a00b5 to your computer and use it in GitHub Desktop.
Save justinwoo/98f46c00e21cd31a8df44623717a00b5 to your computer and use it in GitHub Desktop.
Purescript Reactive Programming options

Here are some of the examples of Reactive Programming libraries I've found in Purescript and what I've thought about them so far:

I've never used a library with truly continuous Behaviors, so this was really neat to try out for me. Really nice to use and comes with utilities for working with browser events already, and gives you good Event modules for picking your sampling options as necessary.

I will probably use this library for all of my future uses.

Elm-style Signals. If you liked using Signals pre 0.17 Elm and just need something nice to work with, this might interest you. I believe it will probably be used in Pux for the forseeable future, so you may already be bought-in.

I haven't used this personally, but it is an RxJS binding, with all the normal Reactive Programming goodness you'd expect. Maybe a little awkward that Observables' create methods always come with effects, but can be quite useful for things like auto-cancelling fetching and whatnot.

I used this before, but I believe it's mostly targeting RxJS 4 support.

My small binding to Andre's xstream that I use with my Cycle.js binding. Works fine overall.

An implementation of ES7 Observables in Purescript. I've also used this a bit, and it was good.

@voland62
Copy link

voland62 commented Jul 10, 2017

I think, it will be good to have purescript-coroutines and purescript-aff-coroutines in this list...

@justinwoo
Copy link
Author

I've only used those a few times, and only with Halogen, but can coroutine libraries be considered "Reactive Programming"?...

@voland62
Copy link

In my opinion, yes. Halogen, for example, uses them for event coordination. In all this cases we build event's source/transformer/consumer graph. The question is which api is more convenient(expressive). And it is open question for me, could we do all things using coroutines, that we can with purescript-rxjs for ex.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment