Module
Reactix.React
- Package
- purescript-reactix
- Repository
- garganscript/purescript-reactix
#Element Source
data Element
A React Element node
Instances
IsComponent (Component props) props (Array Element)
IsComponent (Memo props) props (Array Element)
IsComponent (Provider v) (value :: v) (Array Element)
IsComponent (Consumer v) () (v -> Element)
Semigroup Element
Monoid Element
#unsafeHooksEffect Source
unsafeHooksEffect :: forall a. Effect a -> Hooks a
#createContext Source
createContext :: forall v. v -> Context v
Creates a Context
from a given value
#Provider Source
data Provider t0
The Provider for a React Context
Instances
IsComponent (Provider v) (value :: v) (Array Element)
#Consumer Source
data Consumer t0
The Consumer for a React Context
Instances
IsComponent (Consumer v) () (v -> Element)
#IsComponent Source
class IsComponent :: Type -> Row Type -> Type -> Constraint
class IsComponent component (props :: Row Type) children | component -> props, component -> children where
Members
createElement :: component -> Record props -> children -> Element
Instances
IsComponent (Component props) props (Array Element)
IsComponent (Memo props) props (Array Element)
IsComponent (Provider v) (value :: v) (Array Element)
IsComponent (Consumer v) () (v -> Element)
#rawCreateElement Source
rawCreateElement :: forall c p cs. c -> p -> Array cs -> Element
#StaticComponent Source
type StaticComponent :: Row Type -> Type
type StaticComponent props = Record props -> Array Element -> Element
#staticComponent Source
staticComponent :: forall props. String -> StaticComponent props -> Component props
Turns a StaticComponent
function into a Component
#staticComponentWithModule Source
staticComponentWithModule :: forall props. Module -> String -> StaticComponent props -> Component props
#HooksComponent Source
type HooksComponent :: Row Type -> Type
type HooksComponent props = Record props -> Array Element -> Hooks Element
The type of a function that can be turned into a component with
hooksComponent
. Will have access to the Hooks
Monad.
#hooksComponent Source
hooksComponent :: forall props. String -> HooksComponent props -> Component props
Turns a HooksComponent
function into a Component
#hooksComponentWithModule Source
hooksComponentWithModule :: forall props. Module -> String -> HooksComponent props -> Component props
#MonadDelay Source
class MonadDelay :: (Type -> Type) -> Constraint
class (Monad m) <= MonadDelay m
This class is for Monads whose side effect includes delayed computation. So far, it's Effect and Hooks.
Instances
#createRef Source
createRef :: forall r. Unit -> NullableRef r
#readRefM Source
readRefM :: forall r m. MonadDelay m => Ref r -> m r
#readNullableRefM Source
readNullableRefM :: forall r m. MonadDelay m => Ref (Nullable r) -> Effect (Maybe r)