mirror of
https://github.com/centau/vide.git
synced 2026-08-20 14:41:37 +00:00
908 B
908 B
todo
- Implement from solid
- onCleanup
- Index
- For
- untrack
- batch
- async/loading/suspense
- define order with nested properties
type Action<T> = {
type: T,
priority: number,
callback: (Instance) -> ()
}
local function action(priority: number, fn: (Instance) -> ()): Action
end
local function changed(property: string, callback: () -> ())
return action(1, function(instance)
instance:GetPropertyChangedSignal(property):Connect(callback)
end) :: Action<"Changed">
end
create "TextBox" {
Text = "test",
changed "Text" < function(self, data)
end
}
version 1
map(items, function(item, i)
return Item {
Item = item, -- primitive
LayoutOrder = i
}
end)
version 2
each(items, function(item, i)
return Item {
Item = item, -- state
LayoutOrder = i
}
end)