Module

ReactHocs.Context

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

#CONTEXT Source

data CONTEXT :: Effect

#withContext' Source

withContext' :: forall props ctx. (props -> ctx) -> ReactClass props -> ReactClass props

#withContext Source

withContext :: forall props ctx. ctx -> ReactClass props -> ReactClass props

#getFromContext Source

getFromContext :: forall props props' ctx ctx'. WithContextProps props' props ctx' => Lens' ctx ctx' -> ReactClass props -> ReactClass props'

#getContext Source

getContext :: forall props props' ctx. 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.

#readContext Source

readContext :: forall props state eff ctx. Proxy ctx -> ReactThis props state -> Eff (context :: CONTEXT | eff) ctx

You can use it with components that were passed through accessContext.