Module

React.Halo.Component

Package
purescript-react-halo
Repository
robertdp/purescript-react-halo

#HookSpec Source

type HookSpec props state action m = { eval :: Lifecycle props action -> HaloM props state action m Unit, initialState :: state, props :: props }

#UseHalo Source

newtype UseHalo props state action hooks

Constructors

Instances

#useHalo Source

useHalo :: forall props action state. HookSpec props state action Aff -> Hook (UseHalo props state action) (state /\ (action -> Effect Unit))

Run renderless Halo in the current component. This allows Halo to be used with other hooks and other ways of building components.

#ComponentSpec Source

type ComponentSpec props state action m = { eval :: Lifecycle props action -> HaloM props state action m Unit, initialState :: state, render :: { props :: props, send :: action -> Effect Unit, state :: state } -> JSX }

#component Source

component :: forall props action state. String -> ComponentSpec props state action Aff -> Effect (props -> JSX)

Build a component by providing a name and Halo component spec.

#component_ Source

component_ :: forall action state. String -> ComponentSpec Unit state action Aff -> Effect JSX

Build a propless component by providing a name and Halo component spec.