scrimba
Frontend Career Path
React basics
Meme generator
useState - Counter practice
Go Pro!Bootcamp

Bootcamp

Study group

Collaborate with peers in your dedicated #study-group channel.

Code reviews

Submit projects for review using the /review command in your #code-reviews channel

useState - Counter practice
AboutCommentsNotes
useState - Counter practice
Expand for more info
App.js
run
preview
console
import React from "react"

export default function App() {
/**
* Challenge: Set up state to track our count (initial value is 0)
*/
return (
<div className="counter">
<button className="counter--minus">–</button>
<div className="counter--count">
<h1>0</h1>
</div>
<button className="counter--plus">+</button>
</div>
)
}
Console
/index.html
-5:45