Quantcast
Channel: Active questions tagged svelte - Stack Overflow
Viewing all articles
Browse latest Browse all 1541

How to make global variable reactive in Svelte?

$
0
0

The following code does not run when I update the window.test variable, I do not have any log displaying on my console. I thought that test() would be run. Can't we make global variable reactive using svelte ?

  $: window.test && test();  function test() {    console.log('success');  }

Viewing all articles
Browse latest Browse all 1541

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>