Initial commit

This commit is contained in:
aaron 2023-08-08 21:33:11 +01:00
commit cb002f4f27
50 changed files with 4666 additions and 0 deletions

View file

@ -0,0 +1,25 @@
# Reactivity API: Utility
## cleanup()
Runs a callback anytime a reactive scope is re-ran.
- **Type**
```lua
function cleanup(callback: () -> ())
```
- **Example**
```lua
local data = source(1)
watch(function()
local label = create "TextLabel" { Text = data }
cleanup(function()
label:Destroy()
end)
end)
```