0

How do I use component lifecycle methods and other Svelte functionality within a Svelte app created using StackBlitz (https://stackblitz.com/fork/svelte)?

Usually I would just import this sort of thing as an ES import:

import { onMount } from 'svelte'

But this doesn't work.

Will Taylor
  • 1,650
  • 9
  • 23

1 Answers1

1

It looks like the Svelte version on StackBlitz is v2, if you want to use it you can find the documentation here. But I would advice to look for a service that has v3, like CodeSandbox

Stephane Vanraes
  • 14,343
  • 2
  • 23
  • 41