Skip to main content
The Deno 2 Release Candidate is here
Learn more
Module

x/netzo/deps/preact/hooks.ts>useState

Full-stack Deno framework for building business web apps like internal tools, dashboards, admin panels and automated workflows.
Go to Latest
function useState
import { useState } from "https://deno.land/x/netzo@0.4.40/deps/preact/hooks.ts";

Returns a stateful value, and a function to update it.

Parameters

initialState: S | (() => S)

The initial value (or a function that returns the initial value)

Type Parameters

optional
S = undefined

Returns

[S | undefined, StateUpdater<S | undefined>]