aidenybai / aidenybai/hacky-js
feat: async generator functions / async components
Abierto
- Lenguaje dominante
- TypeScript
- Estrellas
- 48
- Forks
- 0
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Descripción
Hey, thanks for your work on this lib.
Crank.js allows components to be defined as [async generator functions](https://crank.js.org/guides/async-components). For example:
```js
async function IPAddress () {
const res = await fetch("https://api.ipify.org");
const address = await res.text();
return
Your IP Address: {address}
;
}
await renderer.render(, document.body);
console.log(document.body.innerHTML); //
Your IP Address: 127.0.0.1
```
Can Hacky support it too? It seems it would be mostly a matter of adding `await` in some parts of the code.
Guía de contribución
No hay ninguna guía de contribución indexada para este repositorio
Evaluación
Este issue todavía no se ha evaluado.