Skip to main content
Create new
Introduction
Reactivity
Props
Logic
Events
Bindings
Lifecycle
Stores
Motion
Transitions
Animations
Easing
SVG
Actions
Classes
Component composition
Context API
Special elements
Module context
Debugging
7GUIs
Miscellaneous
App.svelte
Testing.svelte
<script>
import {
Router, Route, Link, router,
} from 'yrv/debug';

import Testing from './Testing.svelte';

export let hashchange = null;

router.hashchange = hashchange;

let loggedIn;
let myLink = '/';
let count = 0;

router.subscribe(info => {
if (!info.initial) count += 1;
});
</script>

<style>
:global(a[aria-current]) {
font-weight: bold;
}
</style>

<h1 id="top">
<span>Example page</span>
<small>{$router.path}</small>
</h1>

<p>This content is static, always shown.</p>

<Link exact href="/">Home</Link> | <Link href="/test">Test page</Link>
| <Link href="/sub">Anchor page</Link> | <Link href="/e">Error page</Link>

loading Svelte compiler...
/* Select a component to see its compiled code */
result = svelte.compile(source, {
generate: ,
});
/* Select a component to see its compiled code */