We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6bd23ab commit 368e419Copy full SHA for 368e419
src/content/1/en/part1d.md
@@ -335,6 +335,23 @@ const App = () => {
335
336
So now the number of button presses is definitely based on the correct number of left button presses.
337
338
+We can also handle asynchronous updates for the right button:
339
+
340
+```js
341
+const App = () => {
342
+ // ...
343
+ const handleRightClick = () => {
344
+ setAll(allClicks.concat('R'));
345
+ const updatedRight = right + 1;
346
+ setRight(updatedRight);
347
+ setTotal(left + updatedRight);
348
+ };
349
350
351
+}
352
+```
353
354
355
### Conditional rendering
356
357
Let's modify our application so that the rendering of the clicking history is handled by a new <i>History</i> component:
0 commit comments