Skip to content

Instantly share code, notes, and snippets.

@ricardomatias
Created November 11, 2020 13:27
Show Gist options
  • Save ricardomatias/e0a9c589fef65ee799d16f80866b69fd to your computer and use it in GitHub Desktop.
Save ricardomatias/e0a9c589fef65ee799d16f80866b69fd to your computer and use it in GitHub Desktop.
svelte
<script>
export let text = null;
let showText = false;
setTimeout(() => (showText = true), 1000);
</script>
{#if text && showText}
<p>
{text}
</p>
{/if}
import Hello from './Hello.svelte';
new Hello({
target: document.body,
props: {
text: 'foo bar'
}
})
new Hello({
target: document.body
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment