File tree Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Original file line number Diff line number Diff line change 1- import ' ./App.css' ;
2- import { useState } from ' react' ;
1+ import " ./App.css" ;
2+ import { useState } from " react" ;
33function App ( ) {
44 //app compoment
55 const [ points , setPoints ] = useState ( 0 ) ; //set initial points to 0
@@ -12,10 +12,16 @@ function App() {
1212 return (
1313 //dynamic app HTML output
1414 < div className = "App" >
15- < header className = "App-header" > Endless Simple Idle Game</ header >
15+ { /*app context*/ }
16+ < header className = "App-header" >
17+ { /*app header context*/ }
18+ Endless Simple Idle Game
19+ </ header >
1620 < p > Click the button to add points!</ p >
17- Points: < div id = "points-display" > { points } </ div >
21+ { /*display current points value*/ } Points:{ " " }
22+ < div id = "points-display" > { points } </ div >
1823 < br />
24+ { /*increase points from clicking a button*/ }
1925 < button onClick = { ( ) => addPointsFromClick ( ) } > Click to Add Points</ button >
2026 </ div >
2127 ) ;
You can’t perform that action at this time.
0 commit comments