Module

x/nano_jsx/component.ts>Component

🎯 SSR first, lightweight 1kB JSX library.
Go to Latest
class Component
import { Component } from "https://dotland.deno.dev/x/nano_jsx@v0.0.33/component.ts";

Constructors

new
Component(props: P)

Type Parameters

optional
P extends Object = any
optional
S = any

Properties

private
_elements: HTMLElement[]
private
_hasUnmounted: boolean
private
_skipUnmount: boolean
elements: HTMLElement[]

Returns all currently rendered node elements

id: string
writeonly
initState: S
readonly
isClass
props: P
state: S

Methods

private
_didMount(): any
private
_didUnmount(): any
private
_didUpdate(): any
private
_getHash(): any
private
_willUpdate(): any
didMount(): any
didUnmount(): any
didUpdate(): any
render(_update?: any): HTMLElement | void
setState(state: S, shouldUpdate?: boolean)
update(update?: any)

Will forceRender the component

willMount(): any
willUpdate(): any

Static Properties

readonly
isClass