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

x/fathym_atomic_social/src/src.deps.ts>useState

A set of atomic components for use with Preact/Tailwind based sites needing social UX.
Go to Latest
function useState
Re-export
import { useState } from "https://deno.land/x/fathym_atomic_social@v0.0.55/src/src.deps.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)

Returns

[S, StateUpdater<S>]

Type Parameters

optional
S = undefined

Returns

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