Skip to content

Instantly share code, notes, and snippets.

@jarmitage
Last active July 20, 2021 21:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jarmitage/85dd00dd4b5bbf53138d5a5eba48ed25 to your computer and use it in GitHub Desktop.
Save jarmitage/85dd00dd4b5bbf53138d5a5eba48ed25 to your computer and use it in GitHub Desktop.
Svelte example...
<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