🔗 Function: component()
component<
P>(name,init,setup):void
Defined in: src/component.ts:285
Define a component with its states and setup function (connectedCallback)
🔗 Type Parameters
🔗 P
P extends ComponentProps
🔗 Parameters
🔗 name
string
Name of the custom element
🔗 init
{ [K in string | number | symbol]: Initializer<P[K], Component<P>> } = ...
Signals of the component
🔗 setup
(host, select) => Effect<P, Component<P>>[]
Setup function to be called in connectedCallback(), may return cleanup function to be called in disconnectedCallback()
@returns: void
🔗 Returns
void
🔗 Since
0.12.0