docs: update `10-routing.md` to use Svelte 5 syntax (#14910)
authorGarik Asplund <111464359+garikAsplund@users.noreply.github.com>
Sun, 9 Nov 2025 16:23:33 +0000 (08:23 -0800)
committerGitHub <noreply@github.com>
Sun, 9 Nov 2025 16:23:33 +0000 (08:23 -0800)
documentation/docs/20-core-concepts/10-routing.md

index 9dc82135f606b02c6655f4bf28bed2fba59931ca..47e8a1e862e7195af99e7cd6e8f9deef1c44caa8 100644 (file)
@@ -319,9 +319,9 @@ By exporting `POST`/`PUT`/`PATCH`/`DELETE`/`OPTIONS`/`HEAD` handlers, `+server.j
 ```svelte
 <!--- file: src/routes/add/+page.svelte --->
 <script>
-       let a = 0;
-       let b = 0;
-       let total = 0;
+       let a = $state(0);
+       let b = $state(0);
+       let total = $state(0);
 
        async function add() {
                const response = await fetch('/api/add', {