From ef8ec922d0338aacf75a67d1b28d77ff8e89a0d8 Mon Sep 17 00:00:00 2001 From: harish-sethuraman Date: Fri, 5 Nov 2021 11:09:53 +0530 Subject: [PATCH] Fix typos (#4042) --- beta/src/pages/learn/referencing-values-with-refs.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/beta/src/pages/learn/referencing-values-with-refs.md b/beta/src/pages/learn/referencing-values-with-refs.md index e6cad55d6..3c285e410 100644 --- a/beta/src/pages/learn/referencing-values-with-refs.md +++ b/beta/src/pages/learn/referencing-values-with-refs.md @@ -101,7 +101,7 @@ export default function Stopwatch() { setInterval(() => { // Update the current time every 100ms. setNow(Date.now()); - }, 10); + }, 100); } let secondsPassed = 0; @@ -461,7 +461,7 @@ export default function Toggle() { ### Fix debouncing -In this example, all button click hanlders are ["debounced"](https://redd.one/blog/debounce-vs-throttle). To see what this means, press one of the buttons. Notice how the message appears a second later. If you press the button while waiting for the message, the timer will reset. So if you keep clicking the same button fast many times, the message won't appear until a second *after* you stop clicking. Debouncing lets you delay some action until the user "stops doing things". +In this example, all button click handlers are ["debounced"](https://redd.one/blog/debounce-vs-throttle). To see what this means, press one of the buttons. Notice how the message appears a second later. If you press the button while waiting for the message, the timer will reset. So if you keep clicking the same button fast many times, the message won't appear until a second *after* you stop clicking. Debouncing lets you delay some action until the user "stops doing things". This example works, but not quite as intended. The buttons are not independent. To see the problem, click one of the buttons, and then immediately click another button. You'd expect that after a delay, you would see both button's messages. But only the last button's message shows up. The first button's message gets lost.