r/purescript • u/azafeh • 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).
46
Upvotes
View all comments
Show parent comment
1
u/azafeh Apr 05 '20 edited Apr 05 '20
EDIT: World.update only raising the message does look like the most flexible option, but it doesn't seem like it would play nice with the idea of the effectful update being just a convenience over the Elm way. I am contemplating ditching World.update and adding messages the user's update function return type so the user can decide between aff ops in place or raising their result as a message.
As for the affjax example, I think slower running ops should be taken care at the user level (e.g. disable input while fetching the url), but perhaps there are other use cases that should be handled differently.
I will take a look at this all later. Thanks for the feedback!