Saltar al contenido principal
ProductosHerramientas de escritorioTASTECADRevisión de planosTASTEFILESGestión de archivosTASTEFTPTransferencia de archivosTASTESSHEspacio de trabajo remotoTASTEZIPCompresión y extracciónTASTEWINMGestión de archivosHerramientas para desarrolladoresTASTECODEEntorno de desarrollo integrado para RustTASTESTUDIOEntorno integrado de desarrollo y pruebasTASTEETLIntegración de datos (ETL)ServidoresTASTEREMOTEServidor de escritorio remotoTASTEGEOServidor geoespacialTASTEMAILEspacio de trabajo de correoInversiónTASTESTOCKAplicación de escritorio de trading automático de accionesEmpezarDescargasDocumentaciónComprarTodos los productos
Marketplace
Noticias
TecnologíaNoticiasNoticias de desarrollo de hoyDocumentaciónLenguajes de programaciónRustTypeScriptJavaScriptPythonGoC#JavaCC++KotlinDartFrameworks web frontendNext.jsReactVue.js · NuxtSvelteKitAngularFrameworks de servidorSpring BootDjangoFastAPIASP.NET CoreNestJS · ExpressFrameworks de apps y escritorioTauriFlutterReact NativeElectronAlgoritmosFundamentos de algoritmosAlgoritmos esencialesAlgoritmos avanzadosAlgoritmos prácticos
ComunidadProyectosRegistros de desarrolloPromptsProblemas con herramientas de IAEscaparateGuía de la comunidad
ColaboraTransferencia técnicaDesarrollo de sitio webDesarrollo de app de escritorioCanal de lanzamiento y pagosSocio de ventasContacto
ServiciosEscritorio remotoPaquetes de instalación a medida
TASTEDEV
Productos

Herramientas de escritorio

TASTECADAbre planos complejos con ligerezaTASTEFILESSolo los archivos que necesitas, lo más rápido posibleTASTEFTPEl camino más limpio para tus archivosTASTESSHEntre tu servidor y tú, una conexión más sólidaTASTEZIPComprime más rápido, descomprime más seguroTASTEWINMUn gestor de archivos de dos paneles pensado para el teclado

Herramientas para desarrolladores

TASTECODEEdita, compila, depura y prueba apps de Rust en una sola ventanaTASTESTUDIODe la edición a las pruebas remotas y las correcciones con IA aprobadasTASTEETLMueve datos viendo sus valores

Servidores

TASTEREMOTEUn escritorio remoto que funciona en tu propio servidorTASTEGEOUn servidor geoespacial compatible con GeoServer, reconstruido en RustTASTEMAILRecupera el control de tu correo

Inversión

TASTESTOCKTrading automático de acciones según las reglas que tú defines: cuándo y qué

Empezar

DescargasÚltimas versiones de cada productoDocsCómo usar cada productoComprarSuscripciones y licencias perpetuasTodos los productosTodos los productos de un vistazo
Todos los productos
MarketplaceNoticias
Tecnología

Noticias

Noticias de desarrollo de hoyAnuncios oficiales de lenguajes, frameworks, GitHub e IADocumentaciónGuías de lenguajes, frameworks y algoritmos

Lenguajes de programación

RustTypeScriptJavaScriptPythonGoC#JavaCC++KotlinDart

Frameworks

Frameworks web frontendNext.jsReactVue.js · NuxtSvelteKitAngular
Frameworks de servidorSpring BootDjangoFastAPIASP.NET CoreNestJS · Express
Frameworks de apps y escritorioTauriFlutterReact NativeElectron

Algoritmos

Fundamentos de algoritmosAnálisis de complejidad · Ordenamiento · Búsqueda · Estructuras de datos básicas · Árboles y montículosAlgoritmos esencialesRecorrido de grafos · Camino mínimo y árbol generador mínimo · Programación dinámica · Algoritmos voraces · Divide y vencerás · Backtracking (vuelta atrás)Algoritmos avanzadosAlgoritmos de cadenas · Matemáticas y teoría de números · Manipulación de bits · Árboles de segmentos · Union-FindAlgoritmos prácticosEstrategia para entrevistas de código · Caché LRU · Limitación de tasa · Hashing consistente
Toda la documentación de desarrollo
Comunidad
ProyectosDescubre creadores y su trabajoRegistros de desarrolloDecisiones y aprendizajesPromptsInstrucciones reutilizablesProblemas con herramientas de IAProblemas y alternativas de Claude, Codex, GeminiEscaparateResultados terminadosGuía de la comunidadCómo construimos en abierto
Colabora
Transferencia técnicaApps nativas con Rust y eguiDesarrollo de sitio web10 idiomas, cuentas, documentación y descargasDesarrollo de app de escritorioRust y egui, sin WebViewCanal de lanzamiento y pagosFirma, MSI, deb, rpm, AppImage, hashesSocio de ventasRecomiéndanos y gana el 30 %ContactoDesarrollo, alianzas e inversión
Servicios
Escritorio remotoAccede a tu ordenador desde el navegadorPaquetes de instalación a medidaSolo lo necesario, ajustes precargados
Comprar
ES
한국어EnglishDeutschEspañolFrançaisItalianoPortuguês (Brasil)日本語简体中文繁體中文
Iniciar sesión
Iniciar sesión
TASTEDEV

De pequeñas herramientas a un mejor desarrollo.

support@tastedev.netApoyar a TASTEDEV
ProductosLínea de productosComprarDocsDescargasMarketplaceSoporte
ComunidadProyectosRegistros de desarrolloPromptsProblemas con herramientas de IAEscaparate
PolíticasQuiénes somosPolítica de privacidadTérminos de servicioCondiciones de suscripciónReembolsosNormas de la comunidad
CuentaIniciar sesiónRegistrarse
Visitantes
Hoy
Ayer
Vistas totales
Empresa
GXSOFT
Representante
CHOI YOUNG GU
Número de registro mercantil
853-44-00368
Dirección
9F V24, 351 Gyeongin-ro, Michuhol-gu, Incheon, Republic of Korea
Teléfono
+82-10-4404-1523
Correo electrónico
whitecalvin@tastedev.net
Responsable de privacidad
CHOI YOUNG GU

© 2026 TASTEDEVLa información de los productos se basa en fuentes de desarrollo verificadas.Publicado · en mejora

Documentación de SvelteKit
SvelteKit
Getting Started with SvelteKitProject StructureCore ConceptsData and StateTestingBuilding and Deployment
Debates

Guía de SvelteKit · 3/6

Core Concepts

Por ahora, este capítulo solo está disponible en inglés.

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 ...}.

¿Tienes preguntas sobre este capítulo?
Capítulo anteriorProject StructureCapítulo siguienteData and State
<!-- 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.

0 comentarios

Comentarios destacadosMás recientes primero

Iniciar sesión · Inicia sesión para dejar un comentario.