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

x/live/deps.ts>Component#setState

Open-Source web editor based on Preact, Tailwind and TypeScript. The other side of code.
Go to Latest
method Component.prototype.setState
import { Component } from "https://deno.land/x/live@1.53.6/deps.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