{#each Object.entries(tabs) as [key, tab] (key)} {#if activeTab === key} {#await tab.component then { default: TabComponent }} {/await} {/if} {/each}