Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

199
Visualizações
Simple Svelte code works in REPL but not in VSCode

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>

in VSCode the code doesn't work

Svelte REPL works

I'm confused, what would be the problem? should I change a settings in Svelte config files?

about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

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.

about 4 years ago · Juan Pablo Isaza Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda