Module

Halogen.Hooks.Hook

Package
purescript-halogen-hooks
Repository
thomashoneyman/purescript-halogen-hooks

#Hook Source

type Hook m (newHook :: Type -> Type) a = forall hooks. Hooked m hooks (newHook hooks) a

A function which has access to primitive and custom hooks like UseState, UseEffect, UseRef, and UseMemo. Hook functions can be used to implement reusable, stateful logic and to implement Halogen components.

Functions of this type should be constructed using the Hooks API exposed by Halogen.Hooks.

#Hooked Source

newtype Hooked m pre post a

A largely internal type which underlies the Hook type. Used when the first type variable of the indexed monad, hooks, cannot be hidden.

Constructors

Instances