使用 preact 渲染组件到任何元素
import { render } from 'preact'
const frag = document.createDocumentFragment()
render(<CustomComponent />, frag)
const container = document.querySelector('#container') as HTMLElement
container.prepend(frag)
import { render } from 'preact'
const frag = document.createDocumentFragment()
render(<CustomComponent />, frag)
const container = document.querySelector('#container') as HTMLElement
container.prepend(frag)