@teaui/preact
v1.2.1
Published
Preact renderer for TeaUI
Downloads
184
Maintainers
Readme
TeaUI + Preact
See TeaUI for more info about TeaUI itself. This library adds a Preact renderer/reconciler.
import {useReducer} from 'preact/hooksZ'
import {interceptConsoleLog} from '@teaui/core'
import {
Box,
Button,
Stack,
run,
} from '@teaui/preact'
// Recommended:
interceptConsoleLog()
function App() {
const [bang, goto10] = useReducer((state) => state + '!', '')
return <Box border="single">
<Stack.down>
First there was Ncurses{bang}
<Button onClick={goto10}>Tell me more!</Button>
</Stack.down>
</Box>
}
run()