liqula / react-hs

A GHCJS binding to React based on the Flux design. The flux design pushes state and complicated logic out of the view, allowing the rendering functions and event handlers to be pure Haskell functions.
32 stars 10 forks source link

Make library interface more abstract (MonadFlux, MonadReact). #6

Open fisx opened 7 years ago

fisx commented 7 years ago

Instead of IO, i would like to use abstract monads in class StoreData, event handlers, and views.

Related: #5

This issue needs more details.

fisx commented 7 years ago

https://hackage.haskell.org/package/extensible-0.4.2/docs/Data-Extensible-Effect.html has been shown to be fast, perhaps we can use that: https://www.schoolofhaskell.com/user/fumieval/extensible/the-world-s-fastest-extensible-effects-framework

divipp commented 7 years ago

I tried to add effects to views. It turned out that the only possible effect which can added is the reader monad. The cause is that part of the views may be rerendered several times later.