Skip to content

useList

jsxhook

useList component

Installation

$ bunx termuijs add use-list

Copies the source into src/components/use-list/ and installs @termuijs/jsx.

Usage

ts
import { useList } from '@termuijs/jsx'
ts
const { value, set, reset } = useList({
  initial: undefined,
})

API Reference

useList

PropTypeDefaultDescription
initialT | undefinedInitial value
persistbooleanfalsePersist to storage
keystringStorage key
#hook#use-list