Skip to content

useSubprocess

jsxhook

useSubprocess component

Installation

$ bunx termuijs add use-subprocess

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

Usage

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

API Reference

useSubprocess

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