Skip to content
Work in progress. These docs describe Spawnite at launch, and some parts are still being built.

useBehaviourNode

useBehaviourNode(behaviour, props, traits?): void

useBehaviour’s devtools half: the calling component’s leaf, with the props it was given and the traits an inspector edit is written to. A component that adds more than one trait, as Chase adds its body, calls the two halves itself, names every trait, and stays one leaf.

Parameter Type
behaviour Behaviour
props Record<string, unknown> | undefined
traits Trait[]

void