scrimba
Frontend Career Path
React basics
Meme generator
A11y Update - replace div
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

AboutCommentsNotes
A11y Update - replace div
Expand for more info
App.js
run
preview
console
import React from "react"

export default function App() {
const [isGoingOut, setIsGoingOut] = React.useState(true)

function changeMind() {
setIsGoingOut(prevState => !prevState)
}

return (
<div className="state">
<h1 className="state--title">Do I feel like going out tonight?</h1>
<div onClick={changeMind} className="state--value">
<h1>{isGoingOut ? "Yes" : "No"}</h1>
</div>
</div>
)
}
Console
/index.html
-3:19