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.
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