Skip to Content
Bear documentation

createElement

Import from bear/engine/createElement.

Variables

Fragment

const Fragment: typeof Fragment;

Defined in: bear/engine/createElement.ts:11

Sentinel for JSX fragments.

Functions

attachRefs()

function attachRefs(element): void;

Defined in: bear/engine/createElement.ts:28

Attach reference-stable Ref pointers to an element: the six bounding-box faces plus any names the component type declares via a refs static.

Parameters

ParameterType
elementBearElement

Returns

void


createElement()

function createElement<P>(
   type, 
   props, 
   ...children
): BearElement<P>;

Defined in: bear/engine/createElement.ts:53

JSX factory — replaces React.createElement for the Bear engine.

Type Parameters

Type ParameterDefault type
P extends objectobject

Parameters

ParameterType
type| string | symbol | PartDef<any, string, string> | AssemblyFn<any>
propsP & ElementProps | null
...childrenunknown[]

Returns

BearElement<P>

On this page