aidenybai / aidenybai/hacky-js
feat: async generator functions / async components
Ouverte
- Langage dominant
- TypeScript
- Étoiles
- 48
- Forks
- 0
- Métriques de merge des PR
- Aucune PR mergée en 30 j
Description
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.
Guide de contribution
Aucun guide de contribution indexé pour ce dépôt
Évaluation
Cette issue n'a pas encore été évaluée.