Last active
July 20, 2021 21:08
-
-
Save jarmitage/85dd00dd4b5bbf53138d5a5eba48ed25 to your computer and use it in GitHub Desktop.
Svelte example...
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script> | |
import { onMount } from 'svelte' | |
import { SomethingStore as Something } from '../../stores/somethingStore' | |
import Component from './Component.svelte' | |
$: stuff = $Something.stuff | |
let didMount = false | |
onMount(async () => { | |
await Something.init() | |
didMount = true | |
}) | |
</script> | |
{#if didMount} | |
{#each stuff.things[0].item as item} | |
<Component bind:item={item}/> | |
{/each} | |
{/if} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment