Skip to main content
ProductsDesktop toolsTASTECADDrawing reviewTASTEFILESFile managementTASTEFTPFile transferTASTESSHRemote workspaceTASTEZIPCompression and extractionTASTEWINMFile managementDeveloper toolsTASTECODERust integrated development environmentTASTESTUDIOIntegrated development and test environmentTASTEETLData integration (ETL)ServersTASTEREMOTERemote desktop serverTASTEGEOGeospatial serverTASTEMAILMail workspaceInvestingTASTESTOCKStock auto-trading desktop appGet startedDownloadsDocumentationBuyAll products
Marketplace
News
TechNewsToday's dev newsDeveloper docsProgramming languagesRustTypeScriptJavaScriptPythonGoC#JavaCC++KotlinDartWeb front-end frameworksNext.jsReactVue.js · NuxtSvelteKitAngularServer frameworksSpring BootDjangoFastAPIASP.NET CoreNestJS · ExpressApp & desktop frameworksTauriFlutterReact NativeElectronAlgorithmsAlgorithm basicsCore algorithmsAdvanced algorithmsPractical algorithms
CommunityProjectsDevelopment logsPromptsAI tool issuesShowcaseCommunity guide
Work with usTech transferWebsite buildDesktop app buildRelease and payment pipelineSales partnerContact
ServicesRemote desktopCustom installer packages
TASTEDEV
Products

Desktop tools

TASTECADComplex drawings, opened with easeTASTEFILESJust the files you need, as fast as possibleTASTEFTPThe tidiest path for your filesTASTESSHA stronger link between you and your serversTASTEZIPPack faster, unpack saferTASTEWINMA keyboard-first file manager with two panes

Developer tools

TASTECODEEdit, build, debug and test Rust apps in one windowTASTESTUDIOFrom editing to remote tests and approved AI fixesTASTEETLMove data while you watch the values

Servers

TASTEREMOTEA remote desktop you run on your own serverTASTEGEORebuilding a GeoServer-compatible geospatial server in RustTASTEMAILTake back control of your email

Investing

TASTESTOCKStock auto-trading that follows the rules you set: when, and what

Get started

DownloadsLatest builds of every productDocsHow to use each productBuySubscriptions and perpetual licencesAll productsEvery product at a glance
All products
MarketplaceNews
Tech

News

Today's dev newsOfficial announcements on languages, frameworks, GitHub and AIDeveloper docsGuides to languages, frameworks and algorithms

Programming languages

RustTypeScriptJavaScriptPythonGoC#JavaCC++KotlinDart

Frameworks

Web front-end frameworksNext.jsReactVue.js · NuxtSvelteKitAngular
Server frameworksSpring BootDjangoFastAPIASP.NET CoreNestJS · Express
App & desktop frameworksTauriFlutterReact NativeElectron

Algorithms

Algorithm basicsComplexity analysis · Sorting · Searching · Basic data structures · Trees and heapsCore algorithmsGraph traversal · Shortest paths & minimum spanning trees · Dynamic programming · Greedy algorithms · Divide and conquer · BacktrackingAdvanced algorithmsString algorithms · Math and number theory · Bit manipulation · Segment trees · Union-findPractical algorithmsCoding interview strategy · LRU cache · Rate limiting · Consistent hashing
All development docs
Community
ProjectsDiscover builders and their workDevelopment logsDecisions and lessons learnedPromptsReusable instructionsAI tool issuesProblems and workarounds for Claude, Codex, GeminiShowcaseFinished resultsCommunity guideHow we build in the open
Work with us
Tech transferNative apps in Rust and eguiWebsite build10 languages, accounts, docs and downloadsDesktop app buildRust and egui, no WebViewRelease and payment pipelineSigning, MSI, deb, rpm, AppImage, hashesSales partnerRecommend us and earn 30%ContactBuilds, partnerships and investment
Services
Remote desktopReach your computer from a browserCustom installer packagesOnly the features you need, settings preloaded
Buy
EN
한국어EnglishDeutschEspañolFrançaisItalianoPortuguês (Brasil)日本語简体中文繁體中文
Log in
Log in
TASTEDEV

From small tools to better development.

support@tastedev.netSupport TASTEDEV
ProductsProduct lineupBuyDocsDownloadsMarketplaceSupport
CommunityProjectsDevelopment logsPromptsAI tool issuesShowcase
PoliciesAbout usPrivacy policyTerms of serviceSubscription termsRefund policyCommunity guidelines
AccountLog inSign up
Visitors
Today
Yesterday
Total views
Company
GXSOFT
Representative
CHOI YOUNG GU
Business registration number
853-44-00368
Address
9F V24, 351 Gyeongin-ro, Michuhol-gu, Incheon, Republic of Korea
Phone
+82-10-4404-1523
Email
whitecalvin@tastedev.net
Privacy officer
CHOI YOUNG GU

© 2026 TASTEDEVProduct information is based on verified development sources.Released · improving

SvelteKit docs
SvelteKit
Getting Started with SvelteKitProject StructureCore ConceptsData and StateTestingBuilding and Deployment
Discussions

SvelteKit guide · 3/6

Core Concepts

SvelteKit has two layers worth understanding: Svelte components and runes, which build the UI, and SvelteKit's routing and rendering model, which maps those components to URLs and renders them on the server and in the browser.

Svelte components

Each .svelte file is one component. Logic goes in <script>, markup follows it, and styles go in <style>, which is scoped to that component by default. Svelte compiles the file into code that updates exactly the parts of the DOM that changed, with no virtual DOM.

Runes: $state, $derived, $effect, $props

The current generation of Svelte (Svelte 5) expresses reactivity with runes, special symbols that start with $. They look like functions, but they are syntax understood by the compiler, so you never import them.

RunePurpose
$stateState that updates the UI when it changes
$derivedA value computed from other state
$effectA side effect that runs after state changes (DOM work, timers, third-party libraries)
$propsReceive the props passed by a parent
$bindableMark a prop that a parent can bind to two-way
<script lang="ts">
  let items = $state<string[]>([]);
  let text = $state('');

  let total = $derived(items.length);
  let empty = $derived(total === 0);

  $effect(() => {
    document.title = `${total} todos`;
  });

  function add() {
    if (text.trim()) items.push(text.trim());
    text = '';
  }
</script>

<input bind:value={text} />
<button onclick={add}>Add</button>

{#if empty}
  <p>Nothing to do.</p>
{:else}
  <ul>
    {#each items as item}
      <li>{item}</li>
    {/each}
  </ul>
{/if}

Arrays and objects created with $state are deeply reactive, so mutating them directly with items.push() updates the UI. Reach for $derived whenever a value can be computed, and keep $effect for genuine side effects. Effects only run in the browser, never during server-side rendering.

Props and snippets

A child component receives props through $props(). Instead of the older export let syntax and on:click directives, you destructure props and use plain attributes such as onclick. Markup passed to a child becomes a snippet, which the child renders with {@render ...}.

<!-- src/lib/components/Card.svelte -->
<script lang="ts">
  import type { Snippet } from 'svelte';

  let { title, highlighted = false, children }: {
    title: string;
    highlighted?: boolean;
    children: Snippet;
  } = $props();
</script>

<section class:highlighted>
  <h2>{title}</h2>
  {@render children()}
</section>
<script lang="ts">
  import Card from '#lib/components/Card.svelte';
</script>

<Card title="Notice" highlighted>
  <p>Scheduled maintenance tomorrow.</p>
</Card>

File-based routing and layouts

In SvelteKit, the folder structure of src/routes is your URL structure. +page.svelte is a page, and +layout.svelte wraps the pages in its folder and below. A layout receives a children snippet and renders it where the page should appear.

<!-- src/routes/+layout.svelte -->
<script lang="ts">
  import { page } from '$app/state';
  let { children } = $props();
</script>

<nav>
  <a href="/" aria-current={page.url.pathname === '/' ? 'page' : undefined}>Home</a>
  <a href="/blog">Blog</a>
</nav>

<main>
  {@render children()}
</main>

page from $app/state is a reactive object holding the current URL, route params, page data and error. The older $app/stores module and its $page store have been removed in the current release. Links are ordinary <a> elements: SvelteKit intercepts clicks and performs a client-side navigation that updates only what changed.

SSR, CSR and prerendering

By default, SvelteKit server-side renders the first request into complete HTML, hydrates it in the browser to make it interactive, and handles later navigations with client-side rendering. You change this per route with page options exported from +page.ts or +layout.ts.

// src/routes/about/+page.ts
export const prerender = true; // generate static HTML at build time

// in src/routes/dashboard/+layout.ts you might write
// export const ssr = false;   // render in the browser only, SPA-style
// export const csr = false;   // ship HTML with no JavaScript
OptionDefaultMeaning
prerenderfalsetrue generates HTML at build time; 'auto' also keeps the route available for server rendering
ssrtruefalse sends an empty shell and renders in the browser
csrtruefalse ships no JavaScript

Options set in the root layout apply to the whole app; options in a nested folder apply only below it. Prerender pages that are the same for everyone, like blog posts and docs; use SSR for per-user pages; and consider ssr = false for screens that lean heavily on browser APIs, such as an editor.

Summary

  • Component reactivity is expressed with runes: $state, $derived, $effect and $props.
  • Events are plain attributes like onclick; child markup is passed as snippets and drawn with {@render}.
  • +page.svelte and +layout.svelte in src/routes define pages and shared shells.
  • Choose a rendering strategy per route with the prerender, ssr and csr options.
Questions about this chapter?
Previous chapterProject StructureNext chapterData and State

0 comments

Top commentsNewest first

Sign in · Sign in to leave a comment.