mirror of
https://github.com/centau/vide.git
synced 2026-08-20 14:41:37 +00:00
Update docs
This commit is contained in:
parent
94add5d452
commit
a3cc2dfbda
30 changed files with 850 additions and 770 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue