Skip to main content
Module

x/htm/mod.ts>Component#setState

Create a html response with JSX.
Go to Latest
method Component.prototype.setState
import { Component } from "https://deno.land/x/htm@0.1.2/mod.ts";

Type Parameters

K extends keyof S

Parameters

state: ((prevState: Readonly<S>, props: Readonly<P>) => Pick<S, K> | Partial<S> | null) | (Pick<S, K> | Partial<S> | null)
optional
callback: () => void