createRawSnippet の使い方
{#snippet link(href, content)}
{content}
{/snippet}
const link = createRawSnippet((href, content) => ({
render: () => `
${content()}`,
setup: (a) => { // ↓自分でもろもろ登録する必要がある
$effect(() => a.href = href());
$effect(() => a.textContent = content());
a.addEventListener('focus', console.log);
return () => a.removeEventListener('focus', console.log);
},
}));