Module

Halogen.Hooks.Types

#HookType

data HookType

The kind of types used in Hooks; primitive Hooks already have this kind, and Hooks of your own should be foreign imported data types that are also types of this kind:

foreign import data UseX :: Hooks.HookType

#StateId

newtype StateId state

Constructors

#ComponentRef

data ComponentRef

A unique reference for a component, which is used to track which component Hooks code is defined in to ensure that it isn't run in another component (this is unsafe, and doing so will throw an exception).

#ComponentTokens

type ComponentTokens q ps o = { outputToken :: OutputToken o, queryToken :: QueryToken q, slotToken :: SlotToken ps }

#QueryToken

data QueryToken (a :: Type -> Type)

A token which carries the type of queries supported by the component which is executing a Hook. Queries are specific to the parent-child component relationship, and so they are not tracked in Hook types.

This token is provided by the component function.

#SlotToken

data SlotToken (slots :: Row Type)

A token which carries the type of child slots supported by the component which is executing a Hook. Child slots are specific to the parent-child component relationship, and so they are not tracked in Hook types.

This token is provided by the component function.

#OutputToken

data OutputToken output

#MemoValues

data MemoValues

An opaque type which signifies that a set of dependencies have been captured and can be used by Hooks like UseMemo and UseEffect.

This type is provided by the captures and capturesWith functions.

Modules