developit / htm

Hyperscript Tagged Markup: JSX alternative using standard tagged templates, with compiler support.
Apache License 2.0
8.64k stars 169 forks source link

async function is not renderd #238

Closed itsumura-h closed 1 year ago

itsumura-h commented 1 year ago

It works

function App(){
  return html`
    <p>hoge</p>
  `
}

render(html`<${App} />`, document.body);

but it is NOT works

async function App(){
  return html`
    <p>hoge</p>
  `
}

render(html`<${App} />`, document.body);
itsumura-h commented 1 year ago

use async function in useEffect and keep component sync function