Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Module

x/deco/deps.ts>Component#setState

Git-based Visual CMS for Deno, </> htmx and Tailwind apps. Deploy on any Deno-compatible host.
Latest
method Component.prototype.setState
import { Component } from "https://deno.land/x/deco@1.75.1/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