@tempots/dom

OnUnmount() function

Creates a renderable function that will be called when the component is unmounted.

Signature:

OnUnmount: (fn: (removeTree: boolean, ctx: DOMContext) => void) => Renderable

Parameters

Parameter

Type

Description

fn

(removeTree: boolean, ctx: DOMContext) => void

The function to be called when the component is unmounted.

Returns: Renderable

A renderable function that takes a DOMContext and returns a function that takes a boolean indicating whether to remove the tree.