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 d8b4e28 commit 3742916Copy full SHA for 3742916
src/App.js
@@ -3,9 +3,11 @@ import { useState } from 'react';
3
function App() {
4
//app compoment
5
const [points, setPoints] = useState(0); //set initial points to 0
6
+ const [clicks, setClicks] = useState(0); //set initial clicks pressed to 0
7
function addPointsFromClick() {
8
//add points from clicking a button
9
setPoints(points + 1); //increase points by 1 when button clicked
10
+ setClicks(clicks + 1); //increase clicks made by 1
11
}
12
return (
13
//dynamic app HTML output
0 commit comments