Module

ReactHocs.Contravariant

Package
purescript-react-hocs
Repository
coot/purescript-react-hocs

#cmapProps Source

cmapProps :: forall props' props. (props' -> props) -> ReactClass props -> ReactClass props'

Turn ReactClass into contravariant functor It returns a React stateless component

#cmapPropsSpec Source

cmapPropsSpec :: forall eff props' props. (props' -> props) -> ReactClass props -> ReactSpec props' Unit eff

You can turn ReactSpec into contravariant functor with this fuction. It returns a ReactSpec, i.e. it will be rendered as statefull react component - unlike cmapProps.