Skip to content

Commit ef8ec92

Browse files
author
harish-sethuraman
authored
Fix typos (#4042)
1 parent bb2ade7 commit ef8ec92

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

beta/src/pages/learn/referencing-values-with-refs.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ export default function Stopwatch() {
101101
setInterval(() => {
102102
// Update the current time every 100ms.
103103
setNow(Date.now());
104-
}, 10);
104+
}, 100);
105105
}
106106

107107
let secondsPassed = 0;
@@ -461,7 +461,7 @@ export default function Toggle() {
461461

462462
### Fix debouncing
463463

464-
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".
464+
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".
465465

466466
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.
467467

0 commit comments

Comments
 (0)