import { render, useSignal } from 'preact'

const Component = () => {
  const text = useSignal('I\'m some text')
  
  return (
    <>
      <div className={text.value ? 'my-class' : 'hidden'}>
        {text.value}
      </div>
      <input onChange={(e) => text.value = e.target.value} type="text" />
    </>
  )
}

render(<Component />, document.body)