Re-exports from ReactHocs.Context


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

#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.

#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.

Re-exports from ReactHocs.Contravariant

#cmapPropsSpec Source

cmapPropsSpec :: forall props props' eff. (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 props state e. ReactThis props state -> Boolean -> Eff e Unit

#readIsMounted Source

readIsMounted :: forall props state e. ReactThis props state -> Eff e Boolean

#isMounted Source

isMounted :: forall props state eff. ReactSpec props state eff -> ReactSpec props state eff

Re-exports from ReactHocs.NullElement

Re-exports from ReactHocs.Refs

#unsafeSetProp Source

unsafeSetProp :: forall e a p s. String -> ReactThis p s -> a -> Eff e Unit

mutate t by overwritting a property with a new value

#refFn Source

refFn :: forall access eff. (HTMLElement -> Eff (refs :: ReactRefs (write :: Write | access) | eff) Unit) -> Props

example refCb (unsafeSetProp "childElement" this) you can readit back from this :: ReactThis props state with readRef name (toForeign this)

#readRef Source

readRef :: forall access eff. String -> Foreign -> Eff (refs :: ReactRefs (read :: Read | access) | eff) (F HTMLElement)