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
Post a Comment