Svelte & SvelteKit for Beginners / Chapter 1 — Getting Started with Svelte (lessons 1–5) / Lesson 1
What Is Svelte? (Choosing Not to Use a Virtual DOM)
Time needed: about 6 min (estimate)
Reading settings
These settings are remembered on this device only.
You can try the opening of this lesson without an account.
How this course works
This course is an introduction to Svelte 5 and SvelteKit 2.
It's for people who can write JavaScript, and from the very start we write everything with runes ($state, $derived).
The pre-Svelte 5 $: and export let are covered together in one lesson "for reading existing code" (lesson 12) and not used anywhere else.
Many articles online are still about version 4, so keep this distinction in mind when you compare.
Every version in this course is one we actually installed: svelte 5.57.1, @sveltejs/kit 2.70.3, vite 8.3.0, typescript 6.0.3, vitest 5.0.1, Node.js v26.9.0, and npm 11.19.1.
The compiled output, build sizes, and test output shown are all real measurements from running this combination.
Who updates the screen?
The tedious part of building browser apps is keeping track of which parts of the screen to fix when a value changes.
In plain JavaScript, you end up calling a "redraw function" yourself every time you change a value.
Forget to call it and the screen stays stale; call it too often and things get needlessly slow.
Tab indents. To leave the editor, press Esc, then Tab.
Create a free account to keep reading
With an account you can read the rest of this lesson, take the quiz, and read every free lesson in this course. Lessons you answer correctly are recorded as complete.
Report a problem with this lesson
Log in to send a report.