Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/live/deps.ts>Component

Open-Source web editor based on Preact, Tailwind and TypeScript. The other side of code.
Go to Latest
class Component
Abstract
import { Component } from "https://deno.land/x/live@1.60.0/deps.ts";

Constructors

new
Component(props?: P, context?: any)

Properties

optional
base: Element | Text
context: any
props: RenderableProps<P>
state: Readonly<S>

Methods

forceUpdate(callback?: () => void): void
abstract
render(
props?: RenderableProps<P>,
state?: Readonly<S>,
context?: any,
): ComponentChild
setState<K extends keyof S>(state: ((prevState: Readonly<S>, props: Readonly<P>) => Pick<S, K> | Partial<S> | null) | (Pick<S, K> | Partial<S> | null), callback?: () => void): void

Static Properties

optional
contextType: Context<any>
optional
defaultProps: any
optional
displayName: string

Static Methods

optional
getDerivedStateFromError(error: any): object | null
optional
getDerivedStateFromProps(props: Readonly<object>, state: Readonly<object>): object | null
interface Component
import { type Component } from "https://deno.land/x/live@1.60.0/deps.ts";

Type Parameters

optional
P = { }
optional
S = { }

Methods

optional
componentWillMount(): void
optional
componentDidMount(): void
optional
componentWillUnmount(): void
optional
getChildContext(): object
optional
componentWillReceiveProps(nextProps: Readonly<P>, nextContext: any): void
optional
shouldComponentUpdate(
nextProps: Readonly<P>,
nextState: Readonly<S>,
nextContext: any,
): boolean
optional
componentWillUpdate(
nextProps: Readonly<P>,
nextState: Readonly<S>,
nextContext: any,
): void
optional
getSnapshotBeforeUpdate(oldProps: Readonly<P>, oldState: Readonly<S>): any
optional
componentDidUpdate(
previousProps: Readonly<P>,
previousState: Readonly<S>,
snapshot: any,
): void
optional
componentDidCatch(error: any, errorInfo: ErrorInfo): void