Question · Svelte and SvelteKit course · Module 4: Props and Events

Defining Props with Runes

How do we define props in Svelte 5 with Runes?

Answer options

  • export let name;
  • let { name } = $props();
  • const name = $prop();
  • @Prop() name: string;

You can check the correct answer by solving this task in the CodeWorlds game.