Svelte moves work to compile time, which trips up people who only know virtual-DOM frameworks. These questions check whether a candidate understands what Svelte actually does.
Hiring a Svelte developer is easy. Telling a real one from a convincing résumé is the hard part — and it’s most of what we do. These are grouped by level, because the same question that stretches a junior is a warm-up for a senior.
Junior Svelte interview questions
0–2 years
Reactivity and components.
How is Svelte different from React or Vue?
Svelte is a compiler: it turns components into small imperative JS at build time with no virtual DOM, so runtime is lighter.
Thinks Svelte ships a heavy runtime like other frameworks.
How does reactivity work in Svelte?
Assignments to component variables are reactive; the compiler instruments them to update the DOM. In Svelte 5, runes like $state make this explicit.
Mutates an array with push and expects the view to update without reassignment.
What are reactive statements ($:)?
Blocks that re-run when their dependencies change, used for derived values and side effects.
Never uses them for derived state.
How do you pass data to a component?
Via props declared with export let (or $props in Svelte 5).
Confused about how props are declared.
How do you handle events in Svelte?
With on:event directives and component event dispatchers for child-to-parent communication.
Cannot pass an event from child to parent.
What is two-way binding with bind:?
Binds a form value or property to a variable so changes flow both ways, e.g. bind:value.
Manually wires value and input handlers unaware of bind:.
How does conditional and list rendering work?
{#if}, {#each} blocks; each items should have a key for correct updates.
Omits keys in {#each} where identity matters.
What is scoped styling in Svelte?
Styles in a component are scoped to it by default, avoiding global leakage.
Assumes styles are global like plain CSS.
Mid-level Svelte interview questions
2–5 years
Stores and SvelteKit basics.
What are Svelte stores?
Observable containers for shared state (writable, readable, derived), accessed reactively with the $ prefix.
Prop-drills global state instead of using a store.
What is the auto-subscription $store syntax?
Prefixing a store with $ in a component auto-subscribes and unsubscribes, avoiding manual lifecycle management.
Manually subscribes and forgets to unsubscribe.
What is SvelteKit and what does it add?
A framework for routing, SSR, endpoints and builds on top of Svelte, with file-based routing.
Thinks SvelteKit is just a starter template.
How does data loading work in SvelteKit?
load functions fetch data for a route on server and/or client; server load keeps secrets server-side.
Fetches in the component and causes waterfalls.
What are slots (or snippets)?
Mechanisms to compose content into a component; slots (or Svelte 5 snippets) let parents inject markup.
Duplicates components instead of composing with slots.
What lifecycle functions does Svelte have?
onMount, onDestroy, beforeUpdate/afterUpdate; onMount runs only in the browser.
Runs browser-only code during SSR and it breaks.
How do you optimise a Svelte app?
Lean on the compiler, avoid unnecessary reactivity, code-split routes, and keep stores focused.
Assumes Svelte apps can’t get slow.
What are actions (use:)?
Reusable functions attached to elements for DOM behaviour like tooltips or click-outside, with lifecycle hooks.
Reimplements DOM behaviour ad hoc in each component.
Senior Svelte interview questions
5+ years
Runes, SSR and architecture.
What changed with runes in Svelte 5?
Explicit reactivity primitives ($state, $derived, $effect) replace implicit assignment reactivity, improving clarity and fine-grained updates.
Unaware of the Svelte 5 reactivity model.
How does SSR and hydration work in SvelteKit?
The server renders HTML for fast first paint, then the client hydrates it to become interactive; universal code must not assume the browser.
Uses window in code that runs on the server.
How do you handle authentication in SvelteKit?
Server hooks and server load functions to validate sessions before rendering, keeping secrets off the client.
Checks auth only on the client.
How do you structure a large SvelteKit app?
Route-based organisation, shared stores and libs, server vs universal code separation, and typed load functions.
One huge component tree with tangled state.
What is progressive enhancement in SvelteKit forms?
Form actions work without JS and enhance with it via use:enhance, so the app is resilient.
Requires JS for basic form submission.
How do you avoid memory leaks with stores and effects?
Rely on auto-subscription, clean up manual subscriptions and effects, and avoid retaining references.
Leaks subscriptions created imperatively.
When is Svelte a good or bad fit?
Great for performance-sensitive UIs and small bundles; the ecosystem and hiring pool are smaller than React’s, which matters for some teams.
Presents Svelte as universally superior.
How do you test Svelte components?
Component testing with the testing library and end-to-end with a tool like Playwright, focusing on behaviour.
Only tests via manual clicking.
Build and score a full interview with our free interview scorecard tool, browse the full question hub, or see how we interview engineers.