Skip to content

Instantly share code, notes, and snippets.

@Nipodemos
Created February 24, 2021 15:15
Show Gist options
  • Select an option

  • Save Nipodemos/9b3b16b8e6db888a0e2ed31b58385d57 to your computer and use it in GitHub Desktop.

Select an option

Save Nipodemos/9b3b16b8e6db888a0e2ed31b58385d57 to your computer and use it in GitHub Desktop.
Reddit question
<script lang="ts">
import { routes } from "./routes";
</script>
<main>
<h1>Available routes:</h1>
{#each Object.keys(routes) as route}
{route}: "{routes[route].path}"
{/each}
</main>
<script>
</script>
<h1>Home page</h1>
<style>
</style>
import Home from "./home.svelte";
export const routes = {
home: {
path: "/",
component: Home,
},
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment