UNPKG

@virtualstate/examples

Version:
19 lines 634 B
import { h } from "@virtualstate/fringe"; import { proxyDocumentInstance } from "./document.js"; import { Cache } from "./cache.js"; async function* Cached() { const cache = new Map(); async function Thing() { return h("td", null, 3); } const node = (h("tr", null, h("td", null, 1), h("td", null, 2), h(Thing, null))); for await (const children of node.children) { yield (h(Cache, { cache: cache, fn: proxyDocumentInstance }, node)); } } export const _ECACHE0001_Render = h(Cached, null); export const _ECACHE0001_URL = import.meta.url; //# sourceMappingURL=index.js.map