scrimba
Frontend Career Path
React basics
Meme generator
Changing state
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
Changing state
Expand for more info
App.js
run
preview
console
import React from "react"

export default function App() {
const [isImportant, func] = React.useState("Yes")
console.log(isImportant)
return (
<div className="state">
<h1 className="state--title">Is state important to know?</h1>
<div className="state--value">
<h1>{isImportant}</h1>
</div>
</div>
)
}
Console
"Yes"
,
/index.html
-3:03