← Back to the exercise

State as a snapshot

The answer to the exercise in State as a snapshot.

The pill read shown, a let the handler assigned. That never survives a render. The still should read watched. The log still prints false because this click's snapshot has not changed.

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>
  );
}