JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 5
  • Score
    100M100P100Q32391F
  • License MIT

Preact renderer for TeaUI

Package Exports

  • @teaui/preact
  • @teaui/preact/.dist/index.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@teaui/preact) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

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()