"Fossies" - the Fresh Open Source Software Archive

Member "cloc-1.86/tests/inputs/reactive.svelte" (19 May 2020, 231 Bytes) of package /linux/privat/cloc-1.86.tar.gz:


As a special service "Fossies" has tried to format the requested text file into HTML format (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file.

    1 <!--
    2  https://svelte.dev/examples#reactive-assignments -->
    3 <script>
    4 	let count = 0;
    5 
    6 	function handleClick() {
    7 		count += 1;
    8 	}
    9 </script>
   10 
   11 <button on:click={handleClick}>
   12 	Clicked {count} {count === 1 ? 'time' : 'times'}
   13 </button>