Skip to content

useMap

jsxhook

useMap component

Installation

$ bunx termuijs add use-map

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

Usage

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

API Reference

useMap

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