cleanup
cleanup is for components that need a cleanup step.
The cleanup callbacks, will run once the current tracking scope is disposed or recreated. It is provided by the Reactive Library in use.
The order seems to be from last added to first added, after the Elements has been removed from the document.
# Arguments
name | type | description |
---|---|---|
fn | fn | function to run once the tracking scope is disposed |
# Snippet
# Timing
Displays current timings of onUnmount on Elements vs cleanup