Skip to content

component

component<Value>(label?): ComponentHandle<Value>

Defined in: handle.ts:604

Creates a new ComponentHandle.

Additionally, a label can be provided for easier identification.

Value = undefined

string

ComponentHandle<Value>

// A component with a value.
const Health = component<number>()
// A tag component.
const IsAlive = component()