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

Remove class with only one instance #83

Closed rjmk closed 6 years ago

rjmk commented 6 years ago

The ViewProps and ExportViewProps typeclasses now only have one instance (after the move to single props).

This clean up removes some unnecessary indirection

tysonzero commented 6 years ago

I'd prefer not introducing proxy arguments unless absolutely necessary, as calls via proxy are substantially more verbose (and IMO ugly) than calls via type applications. I am pretty sure applyViewPropsFromArray will work without that proxy argument, so if there is no reason not to it'd be great if you could change that. Besides that looks good to me.

fisx commented 6 years ago

I like this change either way, with proxy arg or with type application. @rjmk do you have a strong opinion?

rjmk commented 6 years ago

No strong opinion. Will change it to remove Proxy tomorrow

El 25 nov 2017, a las 7:37 p. m., fisx notifications@github.com escribió:

I like this change either way, with proxy arg or with type application. @rjmk do you have a strong opinion?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.

rjmk commented 6 years ago

Done!

tysonzero commented 6 years ago

Seems good to me. @fisx any further thoughts?

fisx commented 6 years ago

nope, all good. i was going to read it more carefully, but four eyes is enough. thanks! (-:

fisx commented 6 years ago

thanks for the contribution! much nicer now!