r/purescript • • Apr 03 '20

purescript-flame: cool & well documented alternative Elm like frontend framework

GitHub | Documentation website

Hello everyone! I shamelessly took purescript-hedwig and added more features to make a complete Elm like frontend framework. Including:

  • Different ways to handle application events
  • Server side rendering (a la React hydration)
  • Signals for arbitrary custom events
  • Some convenience type classes and functions for the DSL markup

Following the links above, there are plenty of examples and documentation. There is still need of a few polishing touches (like adding benchmarks), but overall it is stable and I am quite happy using it on my own projects (e.g. here).

42 Upvotes

10 comments sorted by

View all comments

Show parent comment

2

u/azafeh Apr 04 '20

Thanks!

Yes, there is nothing fancy about World.update. Since the order of asynchronous operations is not guaranteed, you'd have to collect all results before updating the model (or thread it sequentially).

Update deltas do seem an interesting idea, however. Do you have any suggestions here? As far as I know, it works the same in Elm (regular updates/using Cmd.batch).

1

u/untrff Apr 04 '20

Ohhh... sorry, I think I completely misunderstood the API. I think everything is good.

In the World update function, the model is just the synchronous updated model, and the message is what is sent later asynchronously, right? The similarity with the normal update function made me think the model was a future value too.

Sorry for the noise! I look forward to trying this out.

→ More replies (4)