🍃このブログは移転しました。
3秒後、自動的に移動します・・・。

2022-04-25から1日間の記事一覧

Astroで名前付きスロットが使えるのは、同系統のコンポーネント間だけ

つまり、名前付きスロットを`.astro`なコンポーネントで使うとき、 --- import Layout from "..."; --- <Layout> <h2 slot="after-header">After header</h2> <h2>Default slot</h2> <h2 slot="after-footer">After footer</h2> </Layout> これが想定通りに動作するのは、`Layout`コンポーネントも`.astro`のときだけ、という話。たとえば`Layout`…