reactjs - What would be the type of `React.createClass` in Haskell? -


i reading this , wonder type of react.createclass / reactclass , reactcomponent in haskell ?

i trying understand concepts in react, hence question.

my guess this:

type reactclass<tprops> = (tprops) => reactcomponent<tprops>;

would translate haskell like:

data reactclass tprops = data reactclass ( tprops -> reactcomponent tprops )

and

type reactcomponent<tprops> = {   props : tprops,   render : () => reactelement }; 

this translate haskell as:

data reactcomponent tprops = reactcomponent tprops reactelement

but unsure.

could please correct me if wrong ?


Comments

Popular posts from this blog

sql - can we replace full join with union of left and right join? why not? -

javascript - Parallax scrolling and fixed footer code causing width issues -

iOS: Performance of reloading UIImage(name:...) -