Skip to content

Child type since v0.2

Represents some UI which can be parented to an ancestor, usually via Children. The most simple kind of child is a single instance, though arrays can be used to parent multiple instances at once and state objects can be used to make the children dynamic.

Instance | {[any]: Child} | StateObject<Child>

Example Usage

-- all of the following fit the definition of Child

local child1: Child = New "Folder" {}
local child2: Child = {
    New "Folder" {},
    New "Folder" {},
    New "Folder" {}
}
local child3: Child = Computed(function()
    return New "Folder" {}
end)
local child4: Child = {
    Computed(function()
        return New "Folder" {}
    end),
    {New "Folder" {}, New "Folder" {}}
}
Back to top