Top 60 Svelte Interview Questions (2026)

The 60 Svelte questions interviewers actually ask, with direct answers, runnable components, and what the interviewer is listening for. Grouped for freshers, intermediate, and experienced rounds.

60 questions with answers

What Is Svelte?

Key Takeaways

  • Svelte is a UI framework that compiles components to small, framework-free JavaScript at build time instead of shipping a runtime and virtual DOM.
  • Its reactivity is built into the language: in Svelte 5, runes like $state and $derived make dependency tracking explicit.
  • SvelteKit is the official application framework on top of Svelte, handling routing, data loading, and server rendering.
  • Interviews test whether you understand the compiler model and reactivity, not just template syntax, so work your tier first and say answers out loud.

Svelte is a component framework for building user interfaces, but it works differently from most: it's a compiler that turns your components into small, imperative JavaScript at build time, so there's no framework runtime or virtual DOM shipped to the browser. The official Svelte documentation describes it as a way to write components using HTML, CSS, and JavaScript, with reactivity built into the language rather than bolted on through a library. Svelte 5 introduced runes, explicit reactivity primitives like $state and $derived, which replaced the older label-based reactive statements. SvelteKit is the official framework built on top of Svelte for full applications: routing, data loading, and server-side rendering. In interviews, Svelte questions probe how the compiler works, how reactivity tracks dependencies, and how SvelteKit renders, not memorized template trivia. This page collects the 60 questions that come up most, each with a direct answer and runnable code. Increasingly the first round is a live AI coding interview, so pair this bank with our AI interview preparation guides for the format side.

60Questions with answers on this page
3Difficulty tiers: freshers, intermediate, experienced
20+Runnable Svelte snippets you can practice from
45-60 minTypical length of a Svelte technical round

Watch: Svelte in 100 Seconds

Video: Svelte in 100 Seconds (Fireship, YouTube)

Test yourself and earn a certificate

10 quick questions. Score 70%+ to download your Svelte certificate.

Jump to quiz

All Questions on This Page

60 questions
Svelte Interview Questions for Freshers
  1. 1. What is Svelte and how is it different from React or Vue?
  2. 2. What does a Svelte component look like?
  3. 3. How does reactivity work in Svelte?
  4. 4. What are runes in Svelte 5?
  5. 5. What is $derived and how is it different from $state?
  6. 6. How do you pass and receive props in Svelte 5?
  7. 7. How do you handle DOM events in Svelte?
  8. 8. How does conditional rendering work in Svelte?
  9. 9. How do you render a list in Svelte, and why key it?
  10. 10. How does Svelte scope component styles?
  11. 11. What does bind: do in Svelte?
  12. 12. How do you conditionally apply classes in Svelte?
  13. 13. What is onMount and when do you use it?
  14. 14. How do you display JavaScript values in Svelte markup?
  15. 15. Does Svelte have computed properties like Vue?
  16. 16. What is SvelteKit and how does it relate to Svelte?
  17. 17. How do you create and run a new SvelteKit project?
  18. 18. How do you render content passed from a parent into a component?
  19. 19. What does the {@html} tag do, and what's the risk?
  20. 20. What attribute shorthands does Svelte support?
Svelte Intermediate Interview Questions
  1. 21. What is $effect and when should you avoid it?
  2. 22. What are Svelte stores and how do writable and readable differ?
  3. 23. What is a derived store?
  4. 24. When do you use runes versus stores in Svelte 5?
  5. 25. What lifecycle functions does Svelte provide?
  6. 26. What is tick() and why would you await it?
  7. 27. How does a child component notify its parent in Svelte 5?
  8. 28. What is Svelte's context API and when do you use it?
  9. 29. How does routing work in SvelteKit?
  10. 30. What are load functions in SvelteKit?
  11. 31. How does SvelteKit handle server rendering versus client rendering?
  12. 32. How do transitions and animations work in Svelte?
  13. 33. What are actions (use:) in Svelte?
  14. 34. What are form actions in SvelteKit?
  15. 35. Why doesn't push() update the UI, and how do you fix it in Svelte 5?
  16. 36. How do you make a component prop two-way bindable?
  17. 37. What does the {#key} block do?
  18. 38. How does the {#await} block handle promises?
  19. 39. What is a module-level script in a Svelte component?
  20. 40. What are Svelte's special elements like svelte:head and svelte:window?
Svelte Interview Questions for Experienced Developers
  1. 41. What does the Svelte compiler actually produce, and why does that matter?
  2. 42. How does Svelte 5's signal-based reactivity work under the hood?
  3. 43. What are the real trade-offs of choosing Svelte over React for a large project?
  4. 44. How do you manage shared state in a large Svelte application?
  5. 45. What are the common pitfalls with $effect, and how do you avoid them?
  6. 46. How does hydration work in SvelteKit, and what breaks it?
  7. 47. How does data invalidation and dependency tracking work in SvelteKit load functions?
  8. 48. How do you profile and improve performance in a Svelte app?
  9. 49. How do you test Svelte components and SvelteKit apps?
  10. 50. What are snippets in Svelte 5 and how do they replace slots?
  11. 51. What changes when migrating a Svelte 4 codebase to Svelte 5?
  12. 52. How do you write a custom store, and what is the store contract?
  13. 53. How does SvelteKit deploy to different platforms?
  14. 54. What are hooks in SvelteKit, and what do you use handle for?
  15. 55. What security concerns are specific to Svelte and SvelteKit?
  16. 56. When do you use +page.server.js versus +page.js for loading data?
  17. 57. Can Svelte compile to web components, and what are the caveats?
  18. 58. How does error handling work across SvelteKit?
  19. 59. How do you share reactive state across components using runes?
  20. 60. When would you not choose Svelte for a project?

Svelte Interview Questions for Freshers

Freshers20 questions

The fundamentals every entry-level round checks. If any answer here surprises you, that's your study list.

Q1. What is Svelte and how is it different from React or Vue?

Svelte is a UI framework, but it works as a compiler: it turns your components into small, direct-to-the-DOM JavaScript at build time. React and Vue ship a runtime that diffs a virtual DOM in the browser, while Svelte does that work ahead of time.

The practical results: no virtual DOM, smaller starting bundles because there's no framework runtime to download, and reactivity built into the language rather than added through hooks or a reactive library.

Key point: Lead with 'it's a compiler, not a runtime.' That one sentence is what the question is really checking, and everything else follows from it.

Watch a deeper explanation

Video: Svelte Tutorial for Beginners #3 - Svelte Basics (Net Ninja, YouTube)

Q2. What does a Svelte component look like?

A Svelte component is a single .svelte file with three optional parts: a <script> block for logic, plain HTML markup for structure, and a <style> block for CSS that's scoped to the component by default. All three are optional, so a component can be markup only, or script and markup with no styles, whatever the piece needs.

You don't return markup from a function like in React; the markup is the file's body, and the script's top-level variables are available in it.

svelte
<script>
  let name = 'world';
</script>

<h1>Hello {name}!</h1>

<style>
  h1 { color: teal; }  /* scoped to this component */
</style>

Key point: Interviewers watch whether you know the three parts are all optional and that style is scoped without any extra setup.

Q3. How does reactivity work in Svelte?

In Svelte 5, you declare reactive state with the $state rune, and any markup that reads it updates automatically when the value changes. Assigning to a reactive variable is all it takes; there's no setState call and no dependency array to maintain. The compiler figures out which parts of the DOM depend on which values and updates only those.

The compiler tracks which parts of the DOM depend on which values and generates code to update only those parts. So reactivity is fine-grained: changing one value doesn't re-run a whole component.

svelte
<script>
  let count = $state(0);
</script>

<button onclick={() => count++}>
  Clicked {count} times
</button>

Key point: Say assignment triggers the update, and that the compiler updates only the affected DOM. That fine-grained detail separates a real answer from 'it just re-renders.'

Watch a deeper explanation

Video: Rich Harris - Rethinking reactivity (You Gotta Love Frontend, YouTube)

Q4. What are runes in Svelte 5?

Runes are function-like symbols that tell the Svelte compiler how to treat a value: $state for reactive state, $derived for computed values, $effect for side effects, and $props for component props. They a dollar sign and are compiler keywords, not real functions you import comes first.

Svelte 5 introduced them to make reactivity explicit and consistent everywhere, replacing the older let-plus-$:-label approach that only worked at a component's top level.

RunePurpose
$stateDeclare reactive state
$derivedCompute a value from reactive dependencies
$effectRun a side effect when dependencies change
$propsRead the props passed into a component

Key point: Naming all four runes and their jobs is the bar. If you only know $state, you'll get exposed on the follow-up.

Q5. What is $derived and how is it different from $state?

$state holds a value you set directly, like a counter or a form field. $derived computes a value from other reactive values and recomputes automatically whenever any of them change, and you never assign to it directly. Think of $state as the source of truth and $derived as a formula that stays in sync with it.

Use $derived for anything you'd otherwise recalculate by hand: a total, a filtered list, a formatted string. It keeps derived data in sync without an effect.

svelte
<script>
  let price = $state(100);
  let qty = $state(3);
  let total = $derived(price * qty);
</script>

<p>Total: {total}</p>

Key point: The trap is reaching for $effect to compute a value. Correcting that to $derived is exactly what this question screens for.

Q6. How do you pass and receive props in Svelte 5?

The parent passes props as attributes on the component tag, like count={42}. The child reads them by destructuring the $props rune, and can set defaults right there in the destructuring, so a missing prop falls back to a sensible value instead of undefined. You can also collect leftover props with a rest pattern.

In older Svelte you declared each prop with export let. Svelte 5 replaced that with $props, which gives you all props in one object and supports defaults and rest props cleanly.

svelte
<!-- Child.svelte -->
<script>
  let { label, count = 0 } = $props();
</script>
<p>{label}: {count}</p>

<!-- Parent -->
<Child label="Views" count={42} />

Key point: both the old export let and the new $props matters.

Q7. How do you handle DOM events in Svelte?

In Svelte 5 you attach a handler as a normal attribute, like onclick={handler} or oninput={handleInput}. The value is a function that runs when the event fires, and you can pass either a named function or an inline arrow. Earlier Svelte used the on:click directive syntax, which you'll still see across older code and tutorials, so it's worth recognizing both forms.

Event objects arrive as the handler's argument, exactly like plain DOM, so e.target.value and e.preventDefault() work as expected.

svelte
<script>
  let msg = $state('');
  function handleInput(e) {
    msg = e.target.value;
  }
</script>

<input oninput={handleInput} />
<p>{msg}</p>

Q8. How does conditional rendering work in Svelte?

Svelte uses logic blocks in the markup rather than JavaScript expressions embedded in JSX. {#if condition} renders its body when the condition is truthy, with optional {:else if other} and {:else} branches, all closed by {/if}. Because it's a compiler feature, only the matching branch's DOM is created, and switching branches removes the old one and mounts the new one.

It reads like plain templating, which keeps conditional markup easy to scan.

svelte
{#if status === 'loading'}
  <p>Loading...</p>
{:else if status === 'error'}
  <p>Something went wrong</p>
{:else}
  <p>Ready</p>
{/if}

Q9. How do you render a list in Svelte, and why key it?

The {#each} block loops over an iterable: {#each items as item, i} renders its body for each element and gives you the index, and you can destructure the item inline. Adding a key at the end, {#each items as item (item.id)}, tells Svelte how to match each item to its DOM node across updates, which matters as soon as the list changes.

Without a key, reordering or removing items can update the wrong nodes and lose component state, so key any list that isn't static.

svelte
<ul>
  {#each todos as todo (todo.id)}
    <li>{todo.text}</li>
  {/each}
</ul>

Key point: The follow-up is 'why the key?'. Answer with state and identity across reorders, not just 'performance.'

Q10. How does Svelte scope component styles?

Styles in a component's <style> block apply only to that component, not the whole page. Svelte does this at compile time by adding a generated hash class (like svelte-abc123) to the affected elements and appending that class to your selectors, so a p rule here won't touch paragraphs in another component. You write plain, simple selectors and scoping is automatic.

For styles you deliberately want global, wrap the selector in :global(), for example :global(body).

svelte
<style>
  p { color: gray; }          /* scoped to this component */
  :global(body) { margin: 0; } /* deliberately global */
</style>

Q11. What does bind: do in Svelte?

bind: creates a two-way binding between a variable and a form element or component prop. bind:value on an input keeps the variable and the field in sync in both directions, so typing updates the variable and changing the variable updates the field, and you skip writing a manual oninput handler. It's the shortcut for the controlled-input pattern you'd write by hand in React.

It works for checkboxes (bind:checked), select elements, and even element references (bind:this) to get the raw DOM node.

svelte
<script>
  let name = $state('');
</script>

<input bind:value={name} />
<p>Hi {name}</p>

Q12. How do you conditionally apply classes in Svelte?

The class: directive toggles a class based on a condition: class:active={isActive} adds the active class when isActive is truthy and removes it when it's not. It's cleaner than building a class string with template literals or ternaries, and you can stack several on one element. Svelte reevaluates each toggle whenever its condition changes.

There's a shorthand too: class:active applies the active class when a variable named active is truthy.

svelte
<script>
  let isActive = $state(true);
</script>

<button class:active={isActive} class:large={true}>
  Save
</button>

Q13. What is onMount and when do you use it?

onMount registers a callback that runs once, after the component is first rendered into the DOM. It's the place for setup that needs the DOM to actually exist: measuring an element's size, starting an interval or subscription, initializing a chart library, or fetching data on the client. If the callback returns a function, Svelte runs it as cleanup when the component is destroyed.

If the callback returns a function, Svelte runs it on component destroy for cleanup. onMount doesn't run during server-side rendering, which matters in SvelteKit.

svelte
<script>
  import { onMount } from 'svelte';
  let data = $state(null);

  onMount(async () => {
    const res = await fetch('/api/stats');
    data = await res.json();
  });
</script>

Key point: onMount is skipped during SSR is the detail that.

Q14. How do you display JavaScript values in Svelte markup?

Wrap the expression in single curly braces: {count}, {user.name}, {price * qty}. Any JavaScript expression works, and the result updates automatically when its reactive inputs change. The same braces set attribute values too, like src={imageUrl} or disabled={isLoading}, so you don't concatenate strings by hand. Text in braces is escaped, which keeps it safe by default.

To render raw HTML instead of escaped text, use {@html string}, but only with trusted content because it skips escaping.

Q15. Does Svelte have computed properties like Vue?

Yes, $derived is Svelte's computed value. It recalculates when its dependencies change and caches the result until they do, so reading it repeatedly doesn't rerun the calculation. That's the same idea as Vue's computed properties: derived data that stays in sync automatically, without you writing a watcher or calling a recompute function.

Before runes, the equivalent was a reactive statement with the $: label. Both give you derived data that stays in sync without a manual watcher.

svelte
<script>
  let items = $state([1, 2, 3, 4]);
  let evens = $derived(items.filter(n => n % 2 === 0));
</script>

<p>{evens.length} even numbers</p>

Q16. What is SvelteKit and how does it relate to Svelte?

Svelte is the component framework; SvelteKit is the official application framework built on top of it. SvelteKit adds file-based routing, data loading, server-side rendering, API endpoints, and a build setup, so you can ship a full app rather than wiring those pieces yourself.

The relationship mirrors React and Next.js: you can use Svelte components alone, but real applications usually reach for SvelteKit.

Key point: The clean analogy 'SvelteKit is to Svelte what Next.js is to React' lands well and shows you understand where the boundary sits.

Q17. How do you create and run a new SvelteKit project?

Scaffold a new project with the official sv create command, which walks you through options like TypeScript, ESLint, and a testing setup. Then change into the folder, install dependencies with npm install, and start the dev server with npm run dev. Vite powers the dev server, so it starts fast and reflects saved changes almost instantly.

That dev server gives hot module replacement, so component edits show up without a full page reload or losing state.

bash
npx sv create my-app
cd my-app
npm install
npm run dev

Q18. How do you render content passed from a parent into a component?

In Svelte 5, a component receives whatever markup the parent nests inside its tags through the children snippet prop, and renders it wherever you write {@render children()}. So a Card component can wrap arbitrary content the caller provides, like a heading and a paragraph, and place it inside its own layout. The parent doesn't need any special syntax, it just nests markup between the tags.

Before Svelte 5 this was done with <slot> elements. Snippets replaced slots with a more flexible model that can also take arguments.

svelte
<!-- Card.svelte -->
<script>
  let { children } = $props();
</script>
<div class="card">{@render children()}</div>

<!-- Usage -->
<Card><p>Any nested content</p></Card>

Q19. What does the {@html} tag do, and what's the risk?

By default Svelte escapes text in curly braces, so {value} always renders as plain text and can't inject markup. The {@html value} tag is the exception: it renders a string as raw HTML, which you need when the content genuinely contains markup, like output from a Markdown renderer or a rich-text field.

The risk is cross-site scripting. Passing untrusted input to {@html} lets an attacker inject scripts, so sanitize any user-supplied HTML first and only use the tag on content you trust.

svelte
<script>
  let article = $state('<p>Rendered <strong>markup</strong></p>');
</script>

{@html article}   <!-- renders real HTML, not escaped text -->

Key point: Volunteering the XSS warning before you're asked is the mark of someone who's shipped Svelte to production.

Q20. What attribute shorthands does Svelte support?

When an attribute name matches the variable you're passing, Svelte lets you drop the value: {src} is shorthand for src={src}, and it works for props on components too. For spreading, {...props} passes every key of an object as separate attributes, which is handy for wrapper components that forward props.

These small conveniences cut noise in markup, and forwarding props with the spread is a common pattern for building reusable input and button components.

svelte
<script>
  let src = $state('/logo.png');
  let rest = { alt: 'Logo', width: 120 };
</script>

<img {src} {...rest} />   <!-- src={src} plus spread -->
Back to question list

Svelte Intermediate Interview Questions

Intermediate20 questions

For candidates with working experience: reactivity mechanics, stores, SvelteKit data flow, and the questions that separate users from understanders.

Q21. What is $effect and when should you avoid it?

$effect runs a side effect after the DOM updates, and it re-runs whenever any reactive value it read last time changes. Use it for work that reaches outside Svelte's own world: logging, manually touching the DOM, driving a third-party library, or syncing state to something like localStorage. Svelte tracks the effect's dependencies automatically from what it reads.

Avoid it for computing values; that's what $derived is for. Overusing $effect to set other state creates hard-to-follow update chains and is a common Svelte 5 antipattern.

svelte
<script>
  let count = $state(0);

  $effect(() => {
    console.log('count is now', count);
    // return a cleanup function if needed
    return () => console.log('cleaning up');
  });
</script>

Key point: The production signal here is knowing when NOT to use $effect. If you'd use it to derive a value, expect a correction.

Q22. What are Svelte stores and how do writable and readable differ?

A store holds a value shared across components. writable(initial) gives a store you can update with set and update; readable(initial, start) gives one consumers can only read, with the value produced by a start function. Components read a store's value with the $ prefix, like $count.

The $ auto-subscribes in markup and unsubscribes on destroy, so you rarely call subscribe by hand. Any object with a correct subscribe method counts as a store, which is why the contract, not the built-ins, is the real answer.

svelte
// stores.js
import { writable } from 'svelte/store';
export const count = writable(0);

// Component.svelte
<script>
  import { count } from './stores.js';
</script>
<button onclick={() => $count++}>{$count}</button>
StoreWritable by consumersTypical use
writableYes (set, update)Shared mutable state
readableNoExternal data source, read-only
derivedNoValue computed from other stores

Key point: Explaining the subscribe contract, not just listing writable and readable, is what marks understanding over usage.

Watch a deeper explanation

Video: Svelte Crash Course (Traversy Media, YouTube)

Q23. What is a derived store?

A derived store computes its value from one or more other stores and recomputes automatically whenever any source changes. You pass the source store, or an array of stores, plus a function that maps their current values to the derived value. Components read it with the $ prefix like any store, and it stays in sync without manual subscriptions.

It's the store-level equivalent of $derived: use it when the computed value needs to live outside a single component and be shared.

svelte
import { writable, derived } from 'svelte/store';

export const price = writable(100);
export const qty = writable(2);
export const total = derived(
  [price, qty],
  ([$price, $qty]) => $price * $qty
);

Q24. When do you use runes versus stores in Svelte 5?

Use $state for reactive state that lives inside a component or in a module you import. Use stores when you need the subscribe contract, for example integrating with code that expects a store, or patterns built around readable and derived stores.

Svelte 5 lets $state work in plain .svelte.js modules for shared state, so many cases that used to need a store now use runes. Stores still matter for interop and for the RxJS-style subscribe interface.

NeedReach for
Local component state$state rune
Shared state across components$state in a .svelte.js module, or a store
subscribe contract / interopwritable or readable store
Computed shared valuederived store or $derived

Key point: A candidate who says 'runes for most new state, stores for the subscribe contract and interop' has clearly worked through the Svelte 5 transition.

Q25. What lifecycle functions does Svelte provide?

onMount runs after the first render, onDestroy runs before the component is removed, and tick returns a promise that resolves once pending state changes have applied to the DOM. beforeUpdate and afterUpdate exist in older Svelte but are discouraged in Svelte 5 in favor of $effect.

onMount and onDestroy are the two you use constantly: set up subscriptions or timers in onMount, tear them down in onDestroy (or return the cleanup from onMount).

svelte
<script>
  import { onMount, onDestroy } from 'svelte';
  let id;
  onMount(() => { id = setInterval(tick, 1000); });
  onDestroy(() => clearInterval(id));
</script>

Q26. What is tick() and why would you await it?

State changes in Svelte are batched and applied to the DOM asynchronously, so right after you assign a value the DOM hasn't updated yet. tick() returns a promise that resolves once those pending updates have flushed, so writing await tick() lets you read or measure the updated DOM at exactly the right moment. It's the bridge between changing state and reading its rendered result.

The common case: change a value, await tick(), then measure or scroll an element that depends on the new DOM.

svelte
<script>
  import { tick } from 'svelte';
  let text = $state('');
  async function grow() {
    text += ' more';
    await tick();          // DOM now reflects the change
    scrollToBottom();
  }
</script>

Q27. How does a child component notify its parent in Svelte 5?

The parent passes a callback function as a prop, like onsave, and the child calls it when something happens, passing along any data. This replaces createEventDispatcher from older Svelte, which is now discouraged. Because the callback is an ordinary function prop, it flows down like any other prop and the child stays unaware of who's listening.

Callback props are plain functions, so you get type checking and can pass any arguments, which is simpler than dispatching custom events and listening with on:.

svelte
<!-- Child.svelte -->
<script>
  let { onsave } = $props();
</script>
<button onclick={() => onsave('done')}>Save</button>

<!-- Parent -->
<Child onsave={(msg) => console.log(msg)} />

Key point: Naming createEventDispatcher as the old way and callback props as the current way shows you're current with Svelte 5.

Watch a deeper explanation

Video: Svelte Tutorial for Beginners #17 - Dispatching Custom Events (Net Ninja, YouTube)

Q28. What is Svelte's context API and when do you use it?

setContext(key, value) stores a value that any descendant component can read with getContext(key), without threading it through every level as props. It's set during a component's initialization, so you call it at the top of the script, and only descendants of that component can read it. This solves prop-drilling for values a whole subtree needs but intermediate components don't care about.

Use it for things a whole subtree needs, like a theme, a form controller, or a shared client. Context isn't reactive by itself; put a store or a $state object in it if consumers need updates.

svelte
// Parent
import { setContext } from 'svelte';
setContext('theme', { color: 'teal' });

// Deep child
import { getContext } from 'svelte';
const theme = getContext('theme');

Q29. How does routing work in SvelteKit?

SvelteKit uses file-based routing under src/routes, so the folder The technical sequence is the route map. A folder becomes a URL segment, and a +page.svelte file inside it is the page rendered at that path. Dynamic segments use square brackets, like [slug], and the matched value arrives through the route's params object in your load function and page.

Special files pair with pages: +layout.svelte wraps child routes, +page.js or +page.server.js load data, and +server.js defines API endpoints. The folder The technical sequence is the route map.

text
src/routes/
  +layout.svelte        -> wraps everything
  +page.svelte          -> /
  blog/
    +page.svelte        -> /blog
    [slug]/
      +page.svelte      -> /blog/:slug
      +page.server.js   -> loads that post

Q30. What are load functions in SvelteKit?

A load function fetches the data a page or layout needs before it renders. It lives in +page.js (runs on server and client) or +page.server.js (server only, for secrets and database access), and returns an object the page reads through its data prop.

SvelteKit runs load on the server for the first request (SSR) and on the client for later navigations, so the same code powers both without you handling the difference.

javascript
// +page.server.js
export async function load({ params }) {
  const post = await db.getPost(params.slug);
  return { post };
}

// +page.svelte
// let { data } = $props();  ->  data.post

Key point: Knowing +page.js runs both places while +page.server.js is server-only (for secrets and DB) is the distinction interviewers dig into.

Q31. How does SvelteKit handle server rendering versus client rendering?

By default SvelteKit renders the first page on the server (SSR): it runs your load functions, produces HTML the browser can show immediately, then hydrates that HTML on the client so it becomes interactive. After that first load, navigations between pages happen on the client without full page reloads, which keeps the app feeling fast while the initial response stays SEO-friendly.

You can change this per route: prerender for static pages built at build time, or ssr = false to render only on the client. Choosing the right mode per route is a real design decision.

  • SSR: HTML rendered per request, good for dynamic, SEO-relevant pages.
  • Prerendering: HTML built once at build time, good for static content.
  • CSR only (ssr=false): rendered entirely in the browser, for app-like pages behind auth.

Q32. How do transitions and animations work in Svelte?

Svelte ships transition directives you apply directly to elements: transition:fade for both directions, or in:fly and out:slide to animate entry and exit separately, all from svelte/transition. They run automatically when an element enters or leaves the DOM through an {#if} or {#each} block, and you can pass options like duration or delay. No animation library is needed for the common cases.

The animate: directive handles reordering within an each block (like a smooth list sort), and you can write custom transitions as functions that return CSS over time.

svelte
<script>
  import { fade, fly } from 'svelte/transition';
  let show = $state(true);
</script>

{#if show}
  <div in:fly={{ y: 20 }} out:fade>Hello</div>
{/if}

Q33. What are actions (use:) in Svelte?

An action is a function you attach to an element with use:name. Svelte calls it with the actual DOM node when the element mounts, letting you run imperative setup that needs a real element: wiring up a tooltip library, adding click-outside detection, or attaching a drag handler. It keeps that DOM code out of the component body and reusable across elements.

The action can return an object with update (called when its parameters change) and destroy (called on unmount for cleanup). Actions are Svelte's clean escape hatch to the raw DOM.

svelte
<script>
  function tooltip(node, text) {
    node.title = text;
    return {
      update(newText) { node.title = newText; },
      destroy() {}
    };
  }
</script>

<button use:tooltip={'Save your work'}>Save</button>

Q34. What are form actions in SvelteKit?

Form actions handle POST submissions on the server without you writing a separate API route. You export named actions from +page.server.js, and a form posts to them with method="POST" and an action attribute. They run server-side, validate, and return data or errors.

With progressive enhancement via use:enhance, the form works without JavaScript and gets a smooth client experience when JS is present. It's SvelteKit's answer to form handling.

javascript
// +page.server.js
export const actions = {
  default: async ({ request }) => {
    const data = await request.formData();
    const email = data.get('email');
    if (!email) return { error: 'Email required' };
    await save(email);
    return { success: true };
  }
};

How an enhanced form submission flows

1User submits
the form posts to a named action on +page.server.js
2Server action runs
reads formData, validates, writes to the database
3Result returned
success data or validation errors go back to the page
4Page updates
use:enhance applies the result without a full reload

Without use:enhance the same action still works through a normal browser POST and reload.

Q35. Why doesn't push() update the UI, and how do you fix it in Svelte 5?

In Svelte 5, $state deeply proxies objects and arrays, so array methods like push do trigger updates. The classic 'push doesn't work' problem is a Svelte 3 and 4 issue: reactivity there triggered on assignment, so you had to reassign (items = [...items, x]) or do items.push(x); items = items.

So the honest answer depends on version. In Svelte 5, mutation works because state is a proxy; in older Svelte, reassign to trigger the update.

svelte
<script>
  let items = $state([1, 2, 3]);
  // Svelte 5: this works, the proxy tracks it
  function add() { items.push(items.length + 1); }
  // Svelte 3/4 pattern: reassign to trigger
  // items = [...items, x];
</script>

Key point: Answering 'it depends on the Svelte version' and explaining both is stronger than picking one. That's the whole point of the question.

Q36. How do you make a component prop two-way bindable?

Declare the prop with $bindable() inside the $props destructuring, giving it an optional default, and then the parent can use bind: on it. Without $bindable, props flow one way, parent to child, and the child can't push changes back. With it, changes the child makes to that prop flow back up to the parent's bound variable.

This lets a parent both pass a value in and receive changes out through the same prop, which is how you build controlled inputs as reusable components.

svelte
<!-- FancyInput.svelte -->
<script>
  let { value = $bindable('') } = $props();
</script>
<input bind:value />

<!-- Parent -->
<FancyInput bind:value={name} />

Q37. What does the {#key} block do?

{#key expression} destroys and recreates everything inside it whenever the expression changes. That forces a full remount rather than an update, which resets the block's component state and replays any enter transitions. It's the tool for 'start fresh when this value changes' rather than 'update in place', which is Svelte's normal behavior.

Use it when you want a component to fully reinitialize on some value changing, for example re-running an entry animation when a tab switches, or resetting a form when the selected record changes.

svelte
{#key currentUser.id}
  <ProfileCard user={currentUser} />
{/key}
<!-- swapping users remounts ProfileCard fresh -->

Q38. How does the {#await} block handle promises?

{#await promise} renders different markup for the three states of a promise, right in the template. The first branch shows while it's pending, the {:then value} branch shows the resolved result, and the {:catch error} branch shows if it rejects. Svelte re-renders as the promise settles, so you get loading, success, and error handling in one block with no extra state variables.

It saves you from tracking loading and error flags by hand for simple async displays.

svelte
{#await fetchUser()}
  <p>Loading...</p>
{:then user}
  <p>Hello {user.name}</p>
{:catch error}
  <p>Failed: {error.message}</p>
{/await}

Q39. What is a module-level script in a Svelte component?

A <script module> block (formerly written <script context="module">) runs once when the file is first imported, not once per component instance like the regular <script>. So variables and functions declared there are shared across every instance of the component, which is different from ordinary state that each instance gets its own copy of.

Use it for constants, helper functions, or shared state that shouldn't be duplicated per instance. Exports from a module script become named exports of the component file.

svelte
<script module>
  let totalInstances = 0;   // shared across all uses
  export function reset() { totalInstances = 0; }
</script>
<script>
  totalInstances += 1;      // runs per instance
</script>

Q40. What are Svelte's special elements like svelte:head and svelte:window?

Svelte provides special pseudo-elements for things you can't target with normal markup. svelte:head injects tags into the document head, like a page title or meta tags. svelte:window and svelte:body let you attach events and bindings to window or body from inside a component, for example bind:scrollY or an onkeydown handler on the window.

There's also svelte:element for rendering a tag whose name is decided at runtime, and svelte:boundary for catching errors in a subtree. They're the escape hatches for cases the standard template can't express.

svelte
<svelte:head>
  <title>Dashboard</title>
</svelte:head>

<svelte:window bind:scrollY={y} onkeydown={handleKey} />
<p>Scrolled {y}px</p>
Back to question list

Svelte Interview Questions for Experienced Developers

Experienced20 questions

advanced rounds probe the compiler, reactivity internals, SvelteKit architecture, and production judgment. Expect every answer here to draw a follow-up.

Q41. What does the Svelte compiler actually produce, and why does that matter?

The compiler turns each component into a JavaScript module with imperative code that creates DOM nodes and updates exactly the ones tied to changed state. There's no virtual DOM and no diffing; the update instructions are baked in at build time.

That matters for two reasons: bundles carry component logic instead of a general runtime, so the baseline is smaller, and updates are surgical rather than re-rendering and reconciling. The cost moves from runtime to build time.

Key point: 'Compiles to imperative DOM operations, no runtime diff' is the core. Saying the cost shifts from runtime to build time shows you understand the trade, not just the marketing.

Q42. How does Svelte 5's signal-based reactivity work under the hood?

Svelte 5 rebuilt reactivity on signals. $state creates a reactive source; $derived and $effect create reactions that read those sources. When a reaction runs, Svelte records which signals it read, building a dependency graph, so changing a signal only reruns the reactions that actually depend on it.

This is fine-grained: the framework doesn't re-run a component, it updates the specific derived values, effects, and DOM bindings connected to the changed signal. It's the same family of ideas as SolidJS signals, applied through Svelte's compiler.

Key point: Mentioning automatic dependency tracking and the graph of sources-to-reactions is the senior-level answer. Comparing it to Solid's signals earns extra credit.

Q43. What are the real trade-offs of choosing Svelte over React for a large project?

In Svelte's favor: smaller bundles by default, less boilerplate, scoped styles built in, and reactivity that reads naturally. Against it: a smaller hiring pool, fewer third-party component libraries, less battle-tested tooling for very large teams, and fewer answers when you hit an unusual edge.

The honest senior take weighs team and ecosystem, not just the framework. Svelte shines for lean teams and performance-sensitive apps; React's gravity (talent, libraries, patterns) is the reason large orgs often still pick it.

DimensionSvelteReact
Bundle baselineSmaller (no runtime)Larger (runtime + reconciler)
BoilerplateLessMore (hooks, memoization)
Ecosystem / librariesSmallerVery large
Hiring poolSmallerVery large

Key point: the question needs you weighing team and ecosystem, not evangelizing. Naming Svelte's downsides is what scores.

Q44. How do you manage shared state in a large Svelte application?

Keep local state in $state, lift shared state into .svelte.js modules that export reactive $state objects or stores, and reserve context for subtree-scoped state like a theme or a per-route controller. Avoid a single global god-store; co-locate state with the feature that owns it.

For server data in SvelteKit, load functions plus the data prop are the primary state channel, so a lot of what would be client state in a SPA lives in the load layer instead. That split, server data through load, UI state through runes or stores, keeps large apps manageable.

Q45. What are the common pitfalls with $effect, and how do you avoid them?

The big ones: using $effect to derive state (creating cascading updates that should be $derived), reading state inside an effect that then writes it back (infinite loops), and forgetting cleanup for subscriptions or timers, which leaks. Effects also over-track: any reactive read becomes a dependency, so an effect can rerun more than you expect.

Avoid them by pushing computation into $derived, keeping effects for genuine side effects (DOM, network, external libraries), returning a cleanup function, and scoping what the effect reads. Reach for untrack when you must read a value without depending on it.

svelte
<script>
  import { untrack } from 'svelte';
  let count = $state(0);
  let log = $state([]);
  $effect(() => {
    const c = count;                 // tracked
    untrack(() => log.push(c));       // read/write log without depending on it
  });
</script>

Key point: Naming the derive-with-effect antipattern and the untrack escape hatch is exactly the depth a advanced round is checking for.

Q46. How does hydration work in SvelteKit, and what breaks it?

The server renders your page to HTML and sends it, so the browser shows content immediately. Then the client-side Svelte code attaches to that existing DOM rather than recreating it, wiring up event handlers and reactivity. That's hydration: the page is visible before it's interactive, then becomes interactive without a re-render.

It breaks when server and client render different output: reading window or document at the top level, using Math.random or Date.now during render, or gating markup on something only known on the client. The fix is to defer client-only work to onMount or guard it with browser from $app/environment.

The SSR-to-hydration sequence

1Server render
SvelteKit runs load, renders the page to HTML
2HTML sent
browser paints content immediately, not yet interactive
3JS loads
the compiled client bundle downloads and runs
4Hydrate
Svelte attaches to existing DOM and wires up reactivity

A mismatch between the server render and the client's first render is what causes hydration warnings.

Key point: The follow-up is always 'what causes a hydration mismatch?'. Have the window/random/date examples ready with the onMount fix.

Q47. How does data invalidation and dependency tracking work in SvelteKit load functions?

Load functions declare dependencies implicitly: using fetch tracks that URL, and depends('key') registers a custom dependency. Calling invalidate(url) or invalidate('key') reruns only the load functions that depend on it, and invalidateAll reruns everything. Accessing url.searchParams or params ties a load to those, so the right reruns happen on navigation.

This is what makes SvelteKit data feel live without manual refetching: mutate on the server through a form action, then invalidate the affected dependency and the page's data refreshes from its load function.

javascript
// +page.js
export async function load({ fetch, depends }) {
  depends('app:cart');
  const res = await fetch('/api/cart');
  return { cart: await res.json() };
}
// elsewhere: invalidate('app:cart') reruns just this load

Q48. How do you profile and improve performance in a Svelte app?

Measure first: the browser performance panel for runtime cost, bundle analysis for download size, and Lighthouse or web-vitals for real metrics. Svelte's fine-grained updates mean runtime rendering is rarely the bottleneck; the usual culprits are large dependencies, unkeyed each blocks doing extra DOM work, heavy effects, and shipping too much to the client.

Fixes in order: key your each blocks, move computation to $derived so it's cached, lazy-load heavy components and routes, and in SvelteKit choose prerendering or SSR per route to cut client work. Only then micro-optimize.

  • Key {#each} blocks so updates touch minimal DOM.
  • Prefer $derived over $effect so computed values are cached, not recomputed as side effects.
  • Code-split heavy routes and defer non-critical components.
  • Pick prerender / SSR / CSR per route to match each page's needs.

Q49. How do you test Svelte components and SvelteKit apps?

Component tests use Vitest with the Svelte testing library to render a component, interact with it, and assert on the DOM, which matches how users behave rather than testing internals. Load functions and form actions are plain functions you can unit test directly by passing a mock event. End-to-end flows use Playwright against a running SvelteKit build.

The layered answer, unit-test load logic, component-test UI behavior, and end-to-end the critical paths, indicates production experience. Vitest and Playwright are the tools the official setup scaffolds.

javascript
import { render, screen } from '@testing-library/svelte';
import { expect, test } from 'vitest';
import Counter from './Counter.svelte';

test('increments', async () => {
  render(Counter);
  const btn = screen.getByRole('button');
  await btn.click();
  expect(btn).toHaveTextContent('1');
});

Q50. What are snippets in Svelte 5 and how do they replace slots?

A snippet is a reusable chunk of markup you define with {#snippet name(args)} and render with {@render name(args)}. Passed into a component as props, they cover what slots used to do, including named slots and slot props, but as first-class values you can pass around and call with arguments.

The default children snippet handles the common 'render whatever the parent nested here' case. Snippets are more flexible than slots because they're just values: a component can accept several, choose which to render, and pass data into them.

svelte
<!-- List.svelte -->
<script>
  let { items, row } = $props();
</script>
{#each items as item}
  {@render row(item)}
{/each}

<!-- Usage -->
<List {items}>
  {#snippet row(item)}
    <li>{item.name}</li>
  {/snippet}
</List>

Key point: Framing snippets as 'first-class values, unlike slots' and showing a snippet that takes an argument is the answer that indicates current Svelte 5 knowledge.

Q51. What changes when migrating a Svelte 4 codebase to Svelte 5?

The core shift is reactivity. A plain let plus a $: statement becomes $state and $derived, export let props become a $props destructuring, and reactive statements that ran side effects become $effect. On top of that, createEventDispatcher gives way to callback function props, and slots give way to snippets rendered with {@render}. Most template syntax stays the same, so the churn is concentrated in the script.

Svelte 5 keeps a lot backward compatible, so migration can be incremental. The judgment part is knowing what stays (component structure, most template syntax) versus what's genuinely new (runes, snippets, the reactivity engine underneath).

Svelte 4Svelte 5
let x = 0; $: doubled = x * 2let x = $state(0); let doubled = $derived(x * 2)
export let namelet { name } = $props()
createEventDispatchercallback function props
<slot />{@render children()} snippets

Q52. How do you write a custom store, and what is the store contract?

The store contract is one method: subscribe(callback) that immediately calls the callback with the current value, calls it again on every change, and returns an unsubscribe function. Anything meeting that is a valid store and works with the $ auto-subscription. Writable stores add set and update.

You write custom stores to encapsulate logic, for example a store that also exposes domain methods, by wrapping writable and returning a curated set of methods plus subscribe.

javascript
import { writable } from 'svelte/store';

export function createCounter() {
  const { subscribe, set, update } = writable(0);
  return {
    subscribe,
    increment: () => update(n => n + 1),
    reset: () => set(0),
  };
}
// const counter = createCounter(); $counter reads it

Q53. How does SvelteKit deploy to different platforms?

SvelteKit uses adapters: a build plugin that packages your app for a target. adapter-node builds a Node server, adapter-static prerenders the whole site to files, and platform adapters (for serverless and edge hosts) output the format that platform expects. adapter-auto picks a common one during CI.

The design keeps your app code platform-agnostic; you change the adapter, not your routes, to move from a Node server to static hosting to an edge function. Knowing prerendering constraints (no per-request server code) is part of choosing correctly.

Q54. What are hooks in SvelteKit, and what do you use handle for?

hooks.server.js exports functions that run on the server for every request. The handle hook wraps request handling: it's where you read cookies, authenticate, put values on event.locals for load functions to read, and modify responses. handleError customizes error handling, and handleFetch rewrites server-side fetch calls.

handle is the choke point for cross-cutting server concerns: auth, logging, headers, and request-scoped context. It's the SvelteKit equivalent of middleware.

javascript
// hooks.server.js
export async function handle({ event, resolve }) {
  const token = event.cookies.get('session');
  event.locals.user = await getUser(token);
  return resolve(event);
}
// load functions read event.locals.user

Q55. What security concerns are specific to Svelte and SvelteKit?

Svelte auto-escapes text interpolation, so {userInput} is safe. The XSS risk is {@html value}: it injects raw HTML unescaped, so never pass untrusted content to it without sanitizing. On the server side, load and form actions must validate input and avoid leaking secrets, keeping sensitive work in +page.server.js and hooks.

Other real ones: CSRF protection on form actions (SvelteKit checks origin on POST), not exposing env variables prefixed for public use by mistake, and setting security headers through the handle hook.

Key point: Leading with {@html} as the XSS vector and env-variable exposure shows you've thought about Svelte's specific footguns, not generic web security.

Q56. When do you use +page.server.js versus +page.js for loading data?

Use +page.server.js (a server load) when the work must stay on the server: database queries, secret API keys, private data, or heavy computation. Its return value is serialized to the client, so it can't return non-serializable things like functions. Use +page.js (a universal load) when the fetch can safely run in the browser too, which enables client-side navigation without a server round trip.

The rule of thumb: secrets and direct data access go server-side; public API calls that should also run on client navigation go universal. You can combine them, with the universal load receiving the server load's data.

+page.server.js+page.js
Runs onServer onlyServer then client
Can access secrets / DBYesNo
Return valueMust be serializableAnything
Best forPrivate data, DB queriesPublic API, client nav

Q57. Can Svelte compile to web components, and what are the caveats?

Yes. Adding <svelte:options customElement="my-widget" /> to a component tells the compiler to output a native custom element instead of a regular Svelte component. You register it once, then use <my-widget> in any framework, a plain HTML page, or a CMS, because it's a standard web component. This is how teams ship a Svelte widget into a codebase that isn't Svelte.

The caveats: custom-element mode changes some behavior (styles are encapsulated in shadow DOM, props map to attributes and are strings unless typed, and slot and context semantics differ), and you carry a bit of runtime you otherwise wouldn't. It's a targeted tool for interop, not the default output.

Q58. How does error handling work across SvelteKit?

In load functions and actions, throw the error helper (error(404, 'Not found')) for expected HTTP errors; SvelteKit renders the nearest +error.svelte page with the status and message. Unexpected exceptions become 500s and go through handleError, where you log and shape a safe message. redirect(303, '/login') works the same way for navigation.

The architecture gives you route-scoped error pages (an +error.svelte per level) plus one central place (handleError) for logging and reporting, so you separate user-facing error UI from operational error handling.

javascript
import { error } from '@sveltejs/kit';

export async function load({ params }) {
  const post = await db.getPost(params.slug);
  if (!post) throw error(404, 'Post not found');
  return { post };
}

Q59. How do you share reactive state across components using runes?

In Svelte 5 you can use runes outside components, in a file named with the .svelte.js (or .svelte.ts) extension. Export a $state object or a function that returns reactive values from that module, and any component importing it gets shared reactivity without a store. The extension is what tells the compiler to process runes in a plain module.

One rule to know: you can't export a reassignable $state variable directly, because importers would get a snapshot. Export an object whose properties you mutate, or a getter, so the reactivity survives the import.

javascript
// counter.svelte.js
export const counter = $state({ value: 0 });
export function increment() { counter.value += 1; }

// any component
// import { counter, increment } from './counter.svelte.js';
// reads counter.value reactively

Key point: Knowing that you export an object (not a bare reassignable variable) shows you've actually built shared state with runes, not just read about it.

Q60. When would you not choose Svelte for a project?

When the team's existing skills, hiring plans, or required libraries center on another framework, the switching cost usually outweighs Svelte's technical wins. Projects that depend on a specific mature React or Angular library with no Svelte equivalent are a concrete case. Very large organizations sometimes value React's deep talent pool and established patterns over a smaller-bundle framework.

The mature answer treats framework choice as a team-and-ecosystem decision, not a benchmark. Svelte earns its place on performance-sensitive apps and lean teams; it's a harder sell where an org's whole platform, tooling, and hiring already assume something else.

Key point: Interviewers ask this to see if you can argue against your own preference. Concrete constraints (libraries, hiring, existing platform) beat vague hedging.

Back to question list

Svelte vs React, Vue, and SolidJS

Svelte's defining choice is compilation. React and Vue ship a runtime that diffs a virtual DOM in the browser; Svelte compiles components ahead of time into direct DOM updates, so bundles start smaller and there's no diffing step at runtime. The trade-off is a smaller ecosystem and job market than React's, and reactivity that's compiler-driven rather than plain function calls. SolidJS shares Svelte's fine-grained, no-virtual-DOM philosophy but stays a runtime library with JSX. Naming these distinctions out loud is itself an interview signal: it shows you pick tools on merits, not habit.

FrameworkRendering modelReactivityWatch out for
SvelteCompiler, no virtual DOMCompiler-tracked (runes in v5)Smaller ecosystem and hiring pool
ReactRuntime virtual DOMRe-render on state change, manual memoLarger bundles, hooks rules
VueRuntime virtual DOMProxy-based reactive refsTwo API styles (Options vs Composition)
SolidJSRuntime, no virtual DOMFine-grained signalsNewer, smaller community than React

How to Prepare for a Svelte Interview

Prepare in layers, and practice out loud. Most Svelte rounds move from concept questions to live component building to a SvelteKit or debugging discussion, so rehearse each stage rather than only reading answers.

  • Master your tier's concepts until you can explain them without notes, then read one tier up for the stretch questions.
  • Type and run every snippet in the Svelte playground; changing working code cements it far faster than reading.
  • Know which Svelte version you're targeting: runes ($state, $derived, $effect) are Svelte 5, and interviewers ask which you've used.
  • Take the quiz on this page to find weak spots, then revisit those questions before the real round.

The typical Svelte interview flow

1Recruiter or phone screen
background, motivation, a few concept checks
2Svelte concepts
reactivity, runes, props, stores, lifecycle
3Live component build
write and explain a component under observation
4SvelteKit or debugging
routing, load functions, SSR, reading unfamiliar code

Earlier rounds increasingly run as AI coding interviews. The concepts on this page are what gets probed at every stage.

Test Yourself: Svelte Quiz

Ready to test your Svelte knowledge?

10 questions, about 6 minutes. Score 70% or higher to earn a shareable certificate.

10 questions Instant feedback Free certificate on 70%+

Frequently  Asked  Questions

Which Svelte topics should I prioritize before a technical round?

Prioritize the areas that change real decisions: fundamentals, practical tasks, debugging, trade-offs, and evidence. The highest-value questions are tied to a project example, a validation check, or a failure mode.

Should I learn Svelte 5 runes or the older syntax?

Learn runes ($state, $derived, $effect). Svelte 5 made them the default reactivity model, and new projects use them. Know the older $: reactive statements and export let props too, because plenty of existing codebases still use them and interviewers ask you to compare the two. When in doubt, say which version you're answering for.

Do I need to know SvelteKit for a Svelte interview?

For most application roles, yes. SvelteKit is the official framework for routing, data loading, and server rendering, and real Svelte jobs build with it. Component-only questions still come up, but expect at least a few on file-based routing, load functions, and server versus client rendering.

Are these questions enough to pass a Svelte interview?

They cover the question-answer portion well, but most Svelte rounds also include live coding: building a component under observation while explaining your thinking. building small components out loud with a timer is the practice path. Our AI coding interview prep guide covers that format, including how automated evaluation reads your process.

How long does it take to prepare for a Svelte interview?

If you use Svelte at work or in study, one to two weeks of an hour a day covers this bank with practice runs. Starting colder, plan three to four weeks and build components daily; reading answers without typing them is how preparation quietly fails.

Is there a way to test my Svelte knowledge?

Yes. The quiz on this page scores you as you go and explains every answer, so you find your weak spots fast. Pass the threshold and you can download a shareable certificate with your name and score, free and with no sign-up. It's the quickest way to check yourself before the real round.

From the team that builds coding interviews

Hyring builds the AI Coding Interviewer that runs live technical rounds in 20+ languages for 5,000+ hiring teams. These Svelte questions and scoring notes reflect what actually gets asked and evaluated inside the interviews we host.

See how the AI Coding Interviewer works

Sources

Adithyan RKWritten by Adithyan RK
Surya N
Fact-checked by Surya N
Published on: 17 May 2026Last updated: 6 Jul 2026
Share: