Module

Flame.Renderer.Hook

Package
purescript-flame
Repository
easafe/purescript-flame

Snabbdom VNode hooks

#HookFn1 Source

type HookFn1 = EffectFn1 VNode Unit

Foreign VNode hook function with single parameter

#HookFn2 Source

type HookFn2 = EffectFn2 VNode VNode Unit

Foreign VNode hook function with two parameters

#HookFnRemove Source

type HookFnRemove = EffectFn2 VNode (Effect Unit) Unit

Foreign VNode hook function with VNode and remove callback parameters

#createHook Source

createHook :: forall msg. String -> Foreign -> NodeData msg

Creates a hook for given name and provided foreign function

#atInit Source

atInit :: forall msg. HookFn1 -> NodeData msg

Attaches a hook for a vnode been added

#atCreate Source

atCreate :: forall msg. HookFn2 -> NodeData msg

Attaches a hook for a DOM element been created based on a vnode

#atInsert Source

atInsert :: forall msg. HookFn1 -> NodeData msg

Attaches a hook for a vnode element been inserted into the DOM

#atPrepatch Source

atPrepatch :: forall msg. HookFn2 -> NodeData msg

Attaches a hook for a vnode element about to be patched

#atUpdate Source

atUpdate :: forall msg. HookFn2 -> NodeData msg

Attaches a hook for a vnode element being updated

#atPostpatch Source

atPostpatch :: forall msg. HookFn2 -> NodeData msg

Attaches a hook for a vnode element been patched

#atDestroy Source

atDestroy :: forall msg. HookFn1 -> NodeData msg

Attaches a hook for a vnode element directly or indirectly being removed

#atRemove Source

atRemove :: forall msg. HookFnRemove -> NodeData msg

Attaches a hook for a vnode element directly being removed