Module
ReactHocs
- Package
- purescript-react-hocs
- Repository
- coot/purescript-react-hocs
Re-exports from ReactHocs.Context
#withContext' Source
withContext' :: forall ctx props. (props -> ctx) -> ReactClass props -> ReactClass props
#withContext Source
withContext :: forall ctx props. ctx -> ReactClass props -> ReactClass props
#readContext Source
readContext :: forall ctx eff state props. Proxy ctx -> ReactThis props state -> Eff (context :: CONTEXT | eff) ctx
You can use it with components that were passed through accessContext
.
#getFromContext Source
getFromContext :: forall ctx' ctx props' props. WithContextProps props' props ctx' => Lens' ctx ctx' -> ReactClass props -> ReactClass props'
#getContext Source
getContext :: forall ctx props' props. WithContextProps props' props ctx => Proxy ctx -> ReactClass props -> ReactClass props'
#accessContext Source
accessContext :: forall props. ReactClass props -> ReactClass props
This function mutates the component by adding contextTypes
property.
Re-exports from ReactHocs.Contravariant
#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
.
#cmapProps Source
cmapProps :: forall props' props. (props' -> props) -> ReactClass props -> ReactClass props'
Turn ReactClass
into contravariant functor
It returns a React stateless component
Re-exports from ReactHocs.DisplayName
#setDisplayName Source
setDisplayName :: forall props. String -> ReactClass props -> ReactClass props
#mapDisplayName Source
mapDisplayName :: forall props. (String -> String) -> ReactClass props -> ReactClass props
#getDisplayName Source
getDisplayName :: forall props. ReactClass props -> String
Re-exports from ReactHocs.IsMounted
#writeIsMounted Source
writeIsMounted :: forall e state props. ReactThis props state -> Boolean -> Eff e Unit
Re-exports from ReactHocs.NullElement
Re-exports from ReactHocs.Refs
#unsafeSetProp Source
unsafeSetProp :: forall s p a e. String -> ReactThis p s -> a -> Eff e Unit
mutate t
by overwritting a property with a new value