Creates a Kayla element descriptor (virtual representation of an entity/component).
This is the JSX factory used internally by the transpiler. You rarely call it directly, but it powers declarative trees passed to scene.spawn().
scene.spawn()
Props type accepted by the component
The functional component
Props including key, ref, exportsRef, children, etc.
key
ref
exportsRef
children
Element descriptor
const elem = createElement(Player, { x: 400, y: 300 });scene.spawn(elem); Copy
const elem = createElement(Player, { x: 400, y: 300 });scene.spawn(elem);
Creates a Kayla element descriptor (virtual representation of an entity/component).
This is the JSX factory used internally by the transpiler. You rarely call it directly, but it powers declarative trees passed to
scene.spawn().