From fff4506047d950244c3ddf5f4906b86b686fd47c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Dominik=20Bo=C5=A1njak?=
<47727604+dddominikk@users.noreply.github.com>
Date: Sun, 5 Sep 2021 21:40:41 +0200
Subject: [PATCH] Slight improvement to code brevity
- the change improves the brevity of the code, which is a big leitmotif of Svelte's
- a live preview of the button is already available right below the source code, meaning readibility isn't really impacted
- doubly so since the current version already uses a ternary operator
- the function expression in the proposal also addresses the inconsistent semicolon usage in the current version of the file
As a side note, since this tutorial is largely targeting newcomers to JS, maybe calling the function something like "plusOne" would be preferable over intimidating people with three-syllable words like "increment". ECMAScript can be scary enough as it is and educational materials should definitely take such UX factors into consideration; they all add up to something greater than a sum of its parts. :)
---
.../02-reactivity/01-reactive-assignments/app-b/App.svelte | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/site/content/tutorial/02-reactivity/01-reactive-assignments/app-b/App.svelte b/site/content/tutorial/02-reactivity/01-reactive-assignments/app-b/App.svelte
index dff5942d6e..4541e17f8f 100644
--- a/site/content/tutorial/02-reactivity/01-reactive-assignments/app-b/App.svelte
+++ b/site/content/tutorial/02-reactivity/01-reactive-assignments/app-b/App.svelte
@@ -1,11 +1,8 @@