mirror of
https://github.com/centau/vide.git
synced 2026-08-20 23:01:37 +00:00
467 B
467 B
Reactivity API: Utility
cleanup()
Runs a callback anytime a reactive scope is re-ran.
-
Type
function cleanup(callback: () -> ()) -
Example
local data = source(1) watch(function() local label = create "TextLabel" { Text = data } cleanup(function() label:Destroy() end) end)