useSubprocess
jsxhook
useSubprocess component
Terminal
$termuijs render use-subprocess
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
| Prop | Type | Default | Description |
|---|---|---|---|
initial | T | undefined | — | Initial value |
persist | boolean | false | Persist to storage |
key | string | — | Storage key |