Question · Svelte and SvelteKit course · Module 7: Lifecycle

When onMount Runs

When is the onMount function called?

Answer options

  • Before the component is created
  • After the component is mounted in the DOM
  • On every update
  • Before the component is removed

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