I'm learning Svelte and the code is as simple as the following, it works on Svelte REPL but in VSCode (localhost server) the h2 tag doesn't get updated as the input value changes.
<script>
let val = '';
</script>
<svelte:head>
<title>About page</title>
</svelte:head>
<div>
<h1>About</h1>
<input type="text" bind:value={val} />
<h2>value is: {val}</h2>
</div>
I'm confused, what would be the problem? should I change a settings in Svelte config files?
That could happen if hydration is turned off:
Look for:
export const hydrate = false; in the routes/*.svelte file or check if hydrate is turned off in the svelte.config.js
Another option could be that an exception in another file caused the svelte scheduler to hang, check your console for errors.