v0.20.230 - 7.6 / 5.8

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