Update docs

This commit is contained in:
aaron 2024-11-04 23:18:04 +00:00
parent 94add5d452
commit a3cc2dfbda
30 changed files with 850 additions and 770 deletions

View file

@ -1,13 +1,11 @@
# Actions
Actions in Vide are special callbacks that you can pass along with properties,
Actions are special callbacks that you can pass along with properties,
to run some code on an instance receiving them.
```luau
local action = vide.action
```
```luau
create "TextLabel" {
Text = "test",
@ -24,6 +22,7 @@ action used to listen for property changes:
```luau
local action = vide.action
local source = vide.source
local effect = vide.effect
local cleanup = vide.cleanup
@ -49,7 +48,7 @@ effect(function()
print(output())
end)
instance.Text = "foo" -- "foo" will be printed from the effect
instance.Text = "foo" -- "foo" will be printed by the effect
```
The source `output` will be updated with the new property value any time it is