Render and commit
The answer to the exercise in Render and commit.
The handler only logged. Nothing asked React to run the card again, so
commit never wrote a pill. setWatched(true) triggers a render; the new
description includes the badge.
The answer to the exercise in Render and commit.
The handler only logged. Nothing asked React to run the card again, so
commit never wrote a pill. setWatched(true) triggers a render; the new
description includes the badge.
import "./styles.css"; import ShowCard from "./ShowCard"; export default function App() { return ( <div className="page"> <ShowCard title="The Bear" year={2022} genre="Drama" rating={8.6} still="still-warm" /> </div> ); }