v0.20.233 - 11.4 / 5.4

cleanup

cleanup is for components that need a cleanup step.

A cleanup callback runs when the current tracking scope is disposed (or recreated, as happens with a re-run memo).

Callbacks run in reverse registration order (LIFO), after the elements owned by the scope have been removed from the document.

# Arguments

nametypedescription
fnfnfunction to run once the tracking scope is disposed

# Snippet

# Timing

Displays current timings of disconnected on Elements vs cleanup