Skip to content

component

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

Defined in: src/handle.ts:521

Creates a new component.

Additionally, a label can be provided for easier identification during debugging.

Value = undefined

string

ComponentHandle<Value>

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